4

I have seen this link which show how I can restrict download to only tablets, but I am looking the other way round.

How can I restrict my app to only download on mobiles and not on tablets? (It's the requirement from the client.)

halfer
  • 19,824
  • 17
  • 99
  • 186
Nik
  • 2,913
  • 7
  • 40
  • 66

3 Answers3

5

Add a <compatible-screens> element to your manifest, outlining the specific screen sizes and densities that you support.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • thanx cant use this though as I am on version 8 – Nik Apr 13 '12 at 14:42
  • 1
    @Raj: Change your build target to API Level 9 and use it. – CommonsWare Apr 13 '12 at 14:43
  • Sorry can't ... As per the requirement – Nik Apr 13 '12 at 15:02
  • 3
    @Raj: You act as though you have a choice, and you do not, other than to not ship your app or to allow it to work on all screen sizes (including tablets). Your build target does **not** affect what devices can use your app -- you can have a build target of 9 and still ship to API Level 8 devices (or even API Level 1 devices, if you wish). – CommonsWare Apr 13 '12 at 15:06
  • 1
    Thanks for all the help... I can't set as if the app is installed on 2.2 android device the features which are only supported from 2.3 will crash the app. apart from that ... I would like to stick to 2.2 as 20% of my app was downloaded by 2.2 devices.. which hell lots of market... – Nik Apr 16 '12 at 15:00
  • I have finally used the following... But I dont know if this will sove the issue... – Nik Apr 16 '12 at 15:01
  • 1
    @Raj: "I can't set " -- I never told you to set ``. That has absolutely nothing whatsoever to do with your build target, and your build target is what controls whether you can use ``. "But I dont know if this will sove the issue" -- it certainly will not "restrict my app to only download on mobiles and not on tablets". – CommonsWare Apr 16 '12 at 15:48
1

Another possible solution you could use is to add the following to manifest:

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

This will restrict the apk to being installed on devices that the ability to make phone calls(i.e. non-tablets).

Brent Hronik
  • 2,357
  • 1
  • 27
  • 43
0

CommonsWare's Answer is 100% correct.

You have other options also, Use

supports-screens

Or Manually filter the tablet devices in Google Play. This will be tedious task.

San
  • 5,567
  • 2
  • 26
  • 28