Android 自定义chrome共享链接到在某些设备上不工作的其他应用程序

Android 自定义chrome共享链接到在某些设备上不工作的其他应用程序,android,android-studio,android-webview,Android,Android Studio,Android Webview,我正在使用自定义chrome在android应用程序中打开URL。除了工具栏上的共享选项外,其他一切都可以正常工作。在一些设备中,它不工作,根本没有动作。即使某些应用程序使用自定义chrome选项卡,它也无法在play store上提供的应用程序中工作。自定义选项卡是否存在任何问题或我们做错了什么 此代码用于打开共享链接: private static void setShareActionButton(Context context, CustomTabsIntent.Builder buil

我正在使用自定义chrome在android应用程序中打开URL。除了工具栏上的共享选项外,其他一切都可以正常工作。在一些设备中,它不工作,根本没有动作。即使某些应用程序使用自定义chrome选项卡,它也无法在play store上提供的应用程序中工作。自定义选项卡是否存在任何问题或我们做错了什么

此代码用于打开共享链接:

private static void setShareActionButton(Context context, CustomTabsIntent.Builder builder, String url) {
    Bitmap icon = BitmapFactory.decodeResource(context.getResources(), android.R.drawable.ic_menu_share);
    String label = "Share via";

    Intent shareIntent = new Intent();
    shareIntent.setAction(Intent.ACTION_SEND);
    shareIntent.putExtra(Intent.EXTRA_TEXT, url);
    shareIntent.setType("text/plain");

    PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, shareIntent, PendingIntent.FLAG_UPDATE_CURRENT);

    builder.setActionButton(icon, label, pendingIntent);
}
版本:

implementation "androidx.browser:browser:1.3.0-alpha05"