Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling against android P always causes fallback to webview #16

Open
0xMatthewGroves opened this issue Aug 18, 2018 · 0 comments
Open
Assignees

Comments

@0xMatthewGroves
Copy link

0xMatthewGroves commented Aug 18, 2018

I'm not sure what has changed, but the same logic that was previously working to open url in a chrome tab no longer works. Compiling against android P may be the culprit. That, or chrome has updated their package name (which is less likely).

The culprit seems to be the following:

// Now packagesSupportingCustomTabs contains all apps that can handle both VIEW intents
// and service calls.
    if (packagesSupportingCustomTabs.isEmpty()) {
        packageNameToUse = null;

Looks like there are no packages supporting custom tabs generated from this chunk of code:

List<String> packagesSupportingCustomTabs = new ArrayList<>();
        for (ResolveInfo info : resolvedActivityList) {
            Intent serviceIntent = new Intent();
            serviceIntent.setAction(CustomTabsService.ACTION_CUSTOM_TABS_CONNECTION);
            serviceIntent.setPackage(info.activityInfo.packageName);
            if (pm.resolveService(serviceIntent, 0) != null) {
                packagesSupportingCustomTabs.add(info.activityInfo.packageName);
            }
        }
@saschpe saschpe self-assigned this Sep 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants