问题
I need to limit the installation availability of my android app to only Phones (or devices that have SMS capability or SIM Card)
I know I can limit the devices by screen size. But that won't work for me, because as you know we now have phones that have bigger and better resolution screens than some tablets.
The functionality of my app revolves around sending SMS (Text) messages. If the device does not have a SIM Card, I don't want my app to get installed on that device because user reviews be like "the app does not work on my tablet".
I'm also aware that it's probably not possible to filter out devices that do not have an "Active" SIM card. That I might get a person with a phone that is on WiFI and not SIM card. That's okay. If I can target phones and exclude tablets, i'm happy.
回答1:
If I can target phones and exclude tablets, i'm happy.
Whether or not a device supports telephony has little to do with whether it is a "phone" or a "tablet".
If you need telephony, add <uses-feature android:name="android.hardware.telephony" />
to your manifest. This is implied by holding the SEND_SMS
permission, so if you have SEND_SMS
, you will already be restricted to devices with telephony capability.
来源:https://stackoverflow.com/questions/17764325/exclude-tablets-from-apk-publishing