We are creating apps using command
ionic build --configuration=development && ionic capacitor copy android --no-build && npx cap open android
Now latest android policy tells us to remove REQUEST_INSTALL_PACKAGES
this permission.
How I remove same permission.
Tried to add
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" tools:node="remove"/>
In file app/src/main/mainfest file
But when I hit command for build , still I can saw
capacitor-corodova-android-plugin file/mainfest/mainfest file
How can I remove that?
CodePudding user response:
This message could be caused by the following plugin which uses this permission: https://github.com/pwlin/cordova-plugin-file-opener2
An alternative plugin would be, for example: https://github.com/capawesome-team/capacitor-file-opener
CodePudding user response:
Using <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" tools:node="remove"/>
should be enough, but it won't remove the entry from capacitor-corodova-android-plugins
mainfest file as that's the original file with the permission.
What you have to check is the merged manifest.
Open the app/src/main/AndroidManifest.xml
with Android Studio. There is a "text" tab and a "merged manifest" tab.
Click "merged manifest" you will then see how your final AndroidManifest.xml
file will look like when installed in a device and the permissions shouldn't be there.