With this module you can define your app's package visibiliy needs that is otherwise not possible on a managed expo app. Package visibiliy is required on apps targeting Android 11+. You can read more about package visibility here.
Go to the plugin folder to develop on the plugin. Once you are ready to test your plugin you can setup the expo app in the app
folder to use the plugin:
- bump package.json in the plugin
- go to the plugin folder in a terminal,
- run
yarn && yarn build && yarn pack
. - refer to the packed version in the package.json in
app
. E.g."android-manifest-visibility" : "../plugin/android-manifest-visibility-v.1.0.0.tgz"
- setup the plugin in app.json in the
app
(see examples below) - build the apk from the
app
and test on your android phone. E.g. useyarn apk
within the./app
path
Examples
It is possible to define package visibiliy for intents
{
"expo": {
"plugins": [
[
"android-manifest-visibility",
{
"packageVisibilityParams": [
{
"type": "intent",
"name": "android.intent.action.VIEW",
"data": [{ "android:scheme": "geo" }]
},
{
"type": "intent",
"name": "android.intent.action.VIEW",
"data": [{ "android:scheme": "smsto" }]
},
{
"type": "intent",
"name": "android.intent.action.SENDTO",
"data": [{ "android:scheme": "mailto" }]
},
{
"type": "intent",
"name": "android.intent.action.DIAL"
}
]
}
]
]
}
}
and other apps (packages)
{
"expo": {
"plugins": [
[
"android-manifest-visibility",
{
"packageVisibilityParams": [
{
"type": "package",
"name": "com.some.other.app"
},
]
}
]
]
}
}
This plugin should not be needed for bare apps, as you can just configure the android manifest directy.
yarn add android-manifest-visibility
or
npm install android-manifest-visibility
Inspiration to work with expo config plugins can be found here: