trs80
(James Andrewartha)
Setembro 2, 2021, 3:55pm
15
Fiz algumas investigações sobre isso e encontrei o seguinte:
https://git.tt-rss.org/fox/tt-rss-android/src/branch/master/org.fox.ttrss/src/main/java/org/fox/ttrss/CommonActivity.java#L97
e aqui está uma implementação que usa corretamente as abas personalizadas do Firefox no meu dispositivo:
static final String LOCAL_PACKAGE = "com.google.android.apps.chrome";
private static final String EXTRA_CUSTOM_TABS_KEEP_ALIVE =
"android.support.customtabs.extra.KEEP_ALIVE";
private static final String ACTION_CUSTOM_TABS_CONNECTION =
"android.support.customtabs.action.CustomTabsService";
private static String sPackageNameToUse;
private CustomTabsHelper() {}
/**
* Goes through all apps that handle VIEW intents and have a warmup service. Picks
* the one chosen by the user if there is one, otherwise makes a best effort to return a
* valid package name.
*
* This is <strong>not</strong> threadsafe.
*
* @param context {@link Context} to use for accessing {@link PackageManager}.
* @return The package name recommended to use for connecting to custom tabs related components.
*/
public static String getPackageNameToUse(Context context) {
Então, você poderia re-adicioná-la com essa detecção extra, o que removeria corretamente a dependência do Chrome e tornaria o aplicativo útil novamente?