Remove READ_PHONE_STATE permission

Remove READ_PHONE_STATE permission

  

When submitting my app to the play store, I get the message that my app uses the READ_PHONE_STATE permission (and therefore a privacy policy is necessary). This is unexpected, since my app doesn't need it.

How to remove this?

Even after generating a blank app, the permission is still needed.
A plugin called 'cordova-plugin-sim' is used, which could cause the trouble.

That is very likely the culprit. Are you saying that plugin is used even without you adding it?

Correct. I generated a blank app (not the phone template of the module). 

Then these plugins are used (at least they exist in app.apk\assets\www\plugins\):

  • com.outsystems.plugins.deeplinks
  • com.outsystems.plugins.FileChooser
  • com.outsystems.plugins.oscache
  • com.outsystems.plugins.osdbupgrader
  • cordova-plugin-device
  • cordova-plugin-network-information
  • cordova-plugin-sim
  • cordova-plugin-splashscreen
  • cordova-plugin-statusbar
  • cordova-sqlite-storage

And these permissions (at least they are mentioned in AndroidManifest.xml):

  • android.permission.INTERNET
  • android.permission.READ_PHONE_STATE
  • android.permission.READ_ETERNAL_STORAGE
  • android.permission.WRITE_EXTERNAL_STORAGE

Odd. I wouldn't have thought that's necessary. I've asked around whether someone knows why...

In the meantime a support case is opened about this.

Solution

Reply from the OutSystems support ticket:
"Unfortunately the READ_PHONE_STATE permission is required on all OutSystems apps and there is no way around this. The reason this permission is required for OutSystems apps is indeed because of that particular plugin (cordova-plugin-sim) which is included in OutSystems apps and is needed for some of the platform's out-of-the-box offline capabilities. There are some plugins that are part of our native shell to provide some of the expected out-of-the-box platform features (SQL Lite for local storage, native splash screen, status bar, etc). This plugin is one of these."

The plugin is capable of:
"to get data from the SIM card like the carrier name, mcc, mnc and country code and other system dependent additional info." [GitHub]

So our app will be using the plugin and permission as well.

Solution

Thanks for the feedback Bram!