From Android 11 there is a change in App visibility. In my application, I need to navigate to mail apps and navigation apps.
The below code needs to be added in manifest
<manifest package="com.example.game">
<queries>
<intent>
<action android:name="android.intent.action.SEND" />
<data android:mimeType="image/jpeg" />
</intent>
</queries>
...
</manifest>
According to the documentation the above example allows your app to see installed apps that support JPEG image sharing:
https://developer.android.com/training/basics/intents/package-visibility#intent-signature
Could anyone please help what "action" and "data" I need to use for navigation app (google navigation,uber) and mail apps(like outllok,gmail)?
Thanks in advance!
I found my app not working after the Android 11 upgrade which was frustrating and there seemed to be gaps in the release notes to do with the intent queries.
The following code can be used for email as i used a SENDTO intent however if you used a SEND intent, change it to be that.
<queries>
<intent>
<action android:name="android.intent.action.SENDTO" />
<data android:scheme="mailto" />
</intent>
</queries>
You should use "geo" scheme for queries intent in your AndroidManifest.xml file.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example">
...
<queries>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="geo" />
</intent>
</queries>
</manifest>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With