Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
584 views
in Technique[技术] by (71.8m points)

android - Exclude Tablets from APK publishing

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...