I'm trying to open pdf filein chrome custom tab, it works fine using this code
CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder();
CustomTabsIntent customTabsIntent = builder.build();
customTabsIntent.launchUrl(this, Uri.parse("https://docs.google.com/viewerng/viewer?url=" +pdflink));
But the problem is that if the user has disabled chrome from the application settings, and it will not work for another browser. So how can I open it in the chrome custom tab if it is disabled.
Thanks in advance.
this is the exception that appears in the logarithm.
Caused by: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=https:
source
share