I have heard in many places that if my app uses a permission not applicable to a certain device, it will not show up in the play store for that device. Now, in my code, I am playing audio. I mute that audio whenever there is a phone call by doing this:
private PhoneStateListener phoneStateListener = new PhoneStateListener() {
@Override
public void onCallStateChanged(int state, String incomingNumber) {
if (state == TelephonyManager.CALL_STATE_RINGING) {
onPhoneCallInterrupt(); //Method I made that mutes audio for phone call
} else if (state == TelephonyManager.CALL_STATE_IDLE) {
} else if (state == TelephonyManager.CALL_STATE_OFFHOOK) {
onPhoneCallInterrupt(); //Method I made that mutes audio for phone call
}
}
};
Now, this uses the following permission in the manifest:
<uses-feature android:name="android.permission.READ_PHONE_STATE" android:required="false" />
Will I get any exceptions because I have made the permission optional by doing android:required = "false"
on devices that don't have phone compatibility (tablets)?
The reason I am so confused on this, is because I am checking if the phone is being used, but I am not using it. So, will my app work on tablets, let alone show up in the play store for them?
Thanks for helping me clear up this confusion,
Ruchir