简体   繁体   中英

How to remove unneeded permissions on Ionic 5 capacitor Android app?

I am setting up my first Ionic React app. I created an app with Ionic 5 and used the In-app Purchase 2 plugin.

I wanted to test this, so I uploaded the signed APK to the Play Store.

When I check the app bundle details on the Play Store, I see that it requires several unneeded permissions:

Required permissions (13)

android.permission.ACCESS_COARSE_LOCATION, android.permission.ACCESS_FINE_LOCATION, android.permission.ACCESS_NETWORK_STATE, android.permission.CAMERA, android.permission.INTERNET, android.permission.MODIFY_AUDIO_SETTINGS, android.permission.READ_EXTERNAL_STORAGE, android.permission.RECEIVE_BOOT_COMPLETED, android.permission.RECORD_AUDIO, android.permission.WAKE_LOCK, android.permission.WRITE_EXTERNAL_STORAGE, com.android.vending.BILLING, com.google.android.c2dm.permission.RECEIVE

For example, it doesn't need ACCESS_COARSE_LOCATION, RECORD_AUDIO, READ_EXTERNAL_STORAGE, and so on.

I didn't set any of this up; apparently " Capacitor apps ship with all the core plugins included ."

How do I remove these?

The permissions are stored in /android/app/src/main/AndroidManifest.xml . You can delete them and then rebuild the app to remove them.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM