0

My application is set to work on 7" and 10" android tablets only. Here's what my XML looks like:

<manifest>
            <supports-screens android:anyDensity="false"
                      android:smallScreens="false"
                      android:normalScreens="false"
                      android:largeScreens="true"
                      android:xlargeScreens="true"/>
            <application android:theme="@style/Theme.AppCompat.Light"/>
            <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="19"/>
</manifest>

Now the app works just fine, I have no problems. I don't want the application to run on phones, but I am still able to install the app on to my phone(nexus 5) from the IDE (I am using Titanium), and it runs fine on my phone as well.

What can I do to make it impossible for the app to be installed on phones?

Ebad Saghar
  • 1,107
  • 2
  • 16
  • 41
  • "My application is set to work on 7" and 10" android tablets only" -- no, it is not. It is set to work on `large` and `xlarge` screens. – CommonsWare Sep 02 '14 at 18:03
  • @CommonsWare well then, 2 questions arise. 1). How can I set it to 7" and 10" and 2). if its set to large and xlarge screens, why is it still able to install/run on my phone which is a nexus 5? – Ebad Saghar Sep 02 '14 at 18:18
  • "How can I set it to 7" and 10"" -- you can't. "why is it still able to install/run on my phone which is a nexus 5?" -- that's a fine question. I haven't played with this combination recently to see if installing via the USB cable bypasses the normal check that is done for valid screen size. It's also possible the problem comes from the Titanium IDE, messing with your manifest settings or something. – CommonsWare Sep 02 '14 at 18:21
  • Ok, well having support for large and xlarge screens implies that this application is for tablets only, which is what I want. It runs/installs fine on tablets. I don't want the ability to install it on anything less than a tablet, which is the problem I'm having. – Ebad Saghar Sep 02 '14 at 18:23
  • 1
    "well having support for large and xlarge screens implies that this application is for tablets only" -- that depends upon your definition of "phone" and "tablet". A 5.5" Galaxy Note-series device may be categorized as `large`, for example. "Phone" and "tablet" are marketing terms, not technical ones. A Nexus 5 should still be `normal`, AFAIK, though it is on the edge of where `large` starts to kick in. – CommonsWare Sep 02 '14 at 18:28
  • Hmmm, I see. Well that brings me back to how I can deploy it specifically for tablets between 7 and 10 inches (but that will be for another question/googling session). Right now, I just want to disable the ability to install to "normal" and smaller screen sizes. – Ebad Saghar Sep 02 '14 at 18:38
  • a simple way will be to check the screen height and give an Alert on the first window. – Dragon Sep 03 '14 at 04:34
  • @Dragon, can you elaborate on that a bit more? – Ebad Saghar Sep 03 '14 at 17:10
  • you can check `Titanium.Platform.displayCaps.platformWidth` and `Titanium.Platform.displayCaps.platformHeight` if its below your supported platform width and height give error alert. – Dragon Sep 04 '14 at 03:45
  • @Dragon, but how can I prevent it being installed anything less than 7inch screens? – Ebad Saghar Sep 04 '14 at 17:26
  • [This](http://stackoverflow.com/questions/10540646/designing-an-android-tablet-only-app/10540882#10540882) answer will fix your Problem i think. – Dragon Sep 05 '14 at 05:42

1 Answers1

0

So I figured it out.

If you install/run the app on any physical device, it will install and run on that said device regardless of any conditions. However, after uploading it to the google play store, the device would have to meet the conditions if you wanted to install it via google play store.

Ebad Saghar
  • 1,107
  • 2
  • 16
  • 41