So why does cordova-plugin-media add READ_PHONE_STATE permission?
I found a commit in Chromium https://chromiumcodereview.appspot.com/12480009/ which may be related. It seems that MediiaPlayerListener.java has refused READ_PHONE_STATE permission.
Can we do the same with the cordova plugin? Thanks.
I have found the answer. The media cordova plugin seems to be listening for state changes like ringing or idle to mute. These events are dispatched by the cordova-android platform itself, listening to the PhoneStateListener events ( https://developer.android.com/reference/android/telephony/PhoneStateListener.html ).
ringing
idle
Apparently, prior to Android API 22, this required READ_PHONE_STATE permission. For API 23, permission is no longer required.
READ_PHONE_STATE
Here is a stackoverflow answer pointing to commit in Android that changed this. Since Android 6.0 listening for changes to PhoneStateListener.LISTEN_DATA_CONNECTION_STATE no longer requires READ_PHONE_STATE permission
Source: https://habr.com/ru/post/1011616/More articles:Using rvest, how to extract html content from an object returned by submit_form () - htmlangularjs ng - repeat outliers from different i18n files - javascriptHow to set positive weight parts of samples in TensorFlow for binary classification - pythonHow do I disable Chrome to autocomplete email username / password? - htmlPermanent data and preparation for Segue - arraysChanging the name of a Firebase package - androidUnexpected invalid memory address or dereferencing of a zero point pointer - goAndroid Android player - rewind to an MPEG-TS file that is being updated - androidjquery / javascript remove div if jpg doesn't match - javascriptEnumerate object properties - javascriptAll Articles