Android 11 requires developers to add a new <query/> entries into the "AndroidManifest.xml" for all intents passed to the Java resolveActivity() and queryIntentActivities() methods or else they will return false or an empty collection respectively.
Google lists which Java APIs are not affected below. The startActivity() and startActivityForResult() methods are not impacted. Intents referencing their own app are fine too.
The following Titanium methods are impacted by this:
- Our openURL() method should not call the Java resolveActivity() anymore so that it won't require the <query/> block. However, our canOpenURL() should continue to use it and we'll need to document the need for this. (Note that iOS requires a "LSApplicationQueriesSchemes" plist setting for this method as well for the same reasons.)
- Ideally, our build system should auto-inject the <query/> block needed if the app's code contains a createEmailDialog() method call.
The canOpenURL() and openURL() methods should log an error if a <query/> entry is needed.
The below PR has test code for canOpenURL() and openURL() which tests several different URLs.