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

Support package visibility on API level 30+ #43

Open
ubuntudroid opened this issue Jul 15, 2020 · 0 comments
Open

Support package visibility on API level 30+ #43

ubuntudroid opened this issue Jul 15, 2020 · 0 comments

Comments

@ubuntudroid
Copy link

ubuntudroid commented Jul 15, 2020

Android R introduces a new concept called package visibility which affects how apps can discover other apps (mainly through calls to resolveActivity() and queryIntentActivities().

This library uses the latter, meaning for apps targeting API level 30+ the library stops working.

There are a few possible ways to fix this:

  1. Ask developers to add the following code snippet to their manifest:

    <intent>
      <action android:name="android.intent.action.VIEW" />
      <category android:name="android.intent.category.BROWSABLE" />
      <data android:scheme="https" />
    </intent>

    I tested this and it works (although I didn't test the case where there is no custom tabs enabled browser on the device).

  2. Alternatively ask developers to add the following queries tag to their manifest. According to the docs this should work as well, but I didn't test it.

  3. Declare one of the aforementioned queries element in this library's manifest. According to the documentation this should have the same effect as (1), but spares the developers using this library the effort to add the tag manually.

  4. Additionally or alternatively (the docs are not very clear on this) use the FLAG_ACTIVITY_REQUIRE_NON_BROWSER or FFLAG_ACTIVITY_REQUIRE_DEFAULT intent flag when querying for apps.

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

1 participant