2

I have an app which open urls via app links. In some cases I need to open external browser, because I cannot resolve link. If user select always open my app and I need to open external browser - I clear app defaults by this:

activity.getPackageManager().clearPackagePreferredActivities(MyPackageUtils.getPackageName(MyApplication.getContext()));

This causes, that chooser dialog open again. I test it on 5 devices, on 4 everything is OK. But on Samsung Galaxy S6 with android 6.0.1, dialog don't appear. And in app detail I see "Go to supported URLs" -> "Via this app". If I install app, default settings is "Always Ask". And clear defaults button always has clickable set to false.

Is there any way to set "Go to supported URLs" back to "Always ask"?

0 Answers0