Reputation: 21
I have an android application. I need to upload in the android market. I have developed this app in "Honeycomb".This app is only for android tablets. I designed the layouts for tablets only (600x1024). I want this app to install only in tablets from android market and not in android phones. I really don't know how to do this..? Do i have to check programmatically..? if so, how to do that..? My intention is that only tablets can install my app..! Please share your valuable suggestions..!
Upvotes: 2
Views: 1176
Reputation: 1131
There are two (good) ways to do this.
One way is to add some variables in the code
Designing an android tablet-only app
Pros: -Easy to handle if there are new tablets
Cons: -Maybe the app will shown to every device (but it's not installable for every device)
The other way is to restrict it in the Market
How to restrict android app to specific device make?
Pros: -Select every device you want or dont want
Cons: -New devices will available so you have to update it
There are also some other ways and there is also another one. But i cant remember at this moment.
Hope could helpya :)
Upvotes: 1
Reputation: 56935
Add this in your manifest file.
<supports-screens
android:largeScreens="true"
android:normalScreens="false"
android:requiresSmallestWidthDp="600"
android:smallScreens="false"
android:xlargeScreens="true" />
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="14" />
Look at here for more details. http://developer.android.com/guide/practices/screens_support.html
http://developer.android.com/guide/topics/manifest/supports-screens-element.html
Upvotes: 1
Reputation: 22038
I dont know if you can definitely exclude phones/ small devices with this, but its worth a try: http://developer.android.com/guide/topics/manifest/supports-screens-element.html
Upvotes: 0
Reputation: 24506
Didn't you try this -
<supports-screens
android:largeScreens="true"
android:normalScreens="false"
android:requiresSmallestWidthDp="600"
android:smallScreens="false"
android:xlargeScreens="true" />
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="14" />
Have a look at this. Have a good article from android developers page. Support Screens Element and Screen support
Upvotes: 2