Question

Well I have this app that have an option to read device sms and missed calls. This is not a needed feature, but its present. The problem is that I have this permissions:

<uses-permission android:name="android.permission.READ_CONTACTS">
</uses-permission >
<uses-permission android:name="android.permission.RECEIVE_SMS">
</uses-permission >
<uses-permission android:name="android.permission.READ_SMS">
</uses-permission >
<uses-permission android:name="android.permission.READ_PHONE_STATE">
</uses-permission >

And I'm sure that some of them are making the app incompatible with tablets, so I tried to change it to:

<uses-feature android:name="android.permission.READ_CONTACTS" android:required="false">
</uses-feature>
<uses-feature android:name="android.permission.RECEIVE_SMS" android:required="false">
</uses-feature>
<uses-feature android:name="android.permission.READ_SMS" android:required="false">
</uses-feature>
<uses-feature android:name="android.permission.READ_PHONE_STATE" android:required="false">
</uses-feature>

But now the app wont show the sms when running in a phone. Is there anything else that I should include in order to make it work?

Thanks

Was it helpful?

Solution

You've got the right idea. Some permissions imply features, but it isn't a 1-to-1 ratio.

The implied feature for SMS is:

<uses-feature android:name="android.hardware.telephony" android:required="false" />

Here is the list of all permissions that imply features:

http://developer.android.com/guide/topics/manifest/uses-feature-element.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top