'intent.createchooser not working on Android 12 (Api 31)
I need to always show the application selection dialog always if there are multiple possible options. Even if there is a default application for this action. I am trying to run a url that opens banking applications. Here is my code
Intent intent = new Intent();
intent.setAction("ACTION_VIEW");
intent.setData(Uri.parse("myPaymentUrl"));
startActivity(Intent.createChooser(intent, "My title"));
It fully works on Android 11, but it doesn't work on Android 12 (Api 31). When I run the code, one application is launched instantly, without select additional options
P.S. I also need to not show browser applications, but only bank applications. I am trying use setFlags, but it is not working
intent.setFlags(1024);//FLAG_ACTIVITY_REQUIRE_NON_BROWSER
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
