Supporting Tablets + Specific Devices

I have this on my build settings:

 android = { supportsScreens = { requiresSmallestWidthDp = 600, smallScreens = false, normalScreens = false, largeScreens = true, xlargeScreens = true, }, }, 

It narrows down the devices to just tablets which I’m fine with. Now, I’ve scoured the forums and Android docs looking for ways to include Galaxy S3 and Nexus4 into the mix. I didn’t find any resource, or maybe my searchfu skills may have failed me. :slight_smile: I thought S3 and N4 falls under requiresSmallestWidthDp = 600

 

Is it possible to be device specific too? What’s the possible workaround?

 

/cheers

As far as I know, this isn’t possible via the build.settings or AndroidManifest.xml file.  The only way to only permit specific devices would be via Google Play’s “Manage excluded devices” section of their Developer Console website.

I believe what Google wants you to do is set up 2 APKs.  One version that is only for tablets as you’ve correctly done via your “build.settings”… and a separate APK that supports all screen sizes.  This means that the APK that supports all screen sizes will include tablets too, so you may want to make it clear in the app description that you have an “HD” or “Tablet” version of your app.  Also, I don’t think there is any way to make a phone-only version of your app either via the “supports-screens” settings.  This is based on information that I’ve read on Google’s website here…

http://developer.android.com/guide/practices/screens-distribution.html#FilteringTabletApps

Anyways, I hope this helps.

As far as I know, this isn’t possible via the build.settings or AndroidManifest.xml file.  The only way to only permit specific devices would be via Google Play’s “Manage excluded devices” section of their Developer Console website.

I believe what Google wants you to do is set up 2 APKs.  One version that is only for tablets as you’ve correctly done via your “build.settings”… and a separate APK that supports all screen sizes.  This means that the APK that supports all screen sizes will include tablets too, so you may want to make it clear in the app description that you have an “HD” or “Tablet” version of your app.  Also, I don’t think there is any way to make a phone-only version of your app either via the “supports-screens” settings.  This is based on information that I’ve read on Google’s website here…

http://developer.android.com/guide/practices/screens-distribution.html#FilteringTabletApps

Anyways, I hope this helps.

Hi Joshua,

I have a question, though. I understand setting up a version for tablets but why do you need to set up the other version with support for all screen sizes? Wouldn’t be better to set up the other version for small screen sizes only?

Thanks in advance.

Best regards,

Paolo

Paolo,

If you look at Google’s documentation that I linked in my post above, you’ll see that this isn’t possible.  You cannot create an app that only targets phone sized devices.  At least not be screen size.

Now, it is possible to create an app that can only be purchased by a “phone”, regardless of screen size.  You can do this by adding the following to your “build.settings” file…

settings = { android = { usesFeatures = { { name = "android.hardware.telephony", required = true } } } } 

That said, doing the above is a bit unusual and I don’t think it’s such a good idea.  Especially since it’s not restricting your app based on screen size.  It’s making an assumption that all phones have a small screen size.  Plus, it might prevent your app from being purchasable on small tablets, which are not phones.

Hi Joshua,

Thanks for the answer. Sorry for not reading the link in your post above.

I’m working on an app that will have two versions and this link it’s certainly a good point to start. Thanks!

Greetings,

Paolo

Hi Joshua,

I have a question, though. I understand setting up a version for tablets but why do you need to set up the other version with support for all screen sizes? Wouldn’t be better to set up the other version for small screen sizes only?

Thanks in advance.

Best regards,

Paolo

Paolo,

If you look at Google’s documentation that I linked in my post above, you’ll see that this isn’t possible.  You cannot create an app that only targets phone sized devices.  At least not be screen size.

Now, it is possible to create an app that can only be purchased by a “phone”, regardless of screen size.  You can do this by adding the following to your “build.settings” file…

settings = { android = { usesFeatures = { { name = "android.hardware.telephony", required = true } } } } 

That said, doing the above is a bit unusual and I don’t think it’s such a good idea.  Especially since it’s not restricting your app based on screen size.  It’s making an assumption that all phones have a small screen size.  Plus, it might prevent your app from being purchasable on small tablets, which are not phones.

Hi Joshua,

Thanks for the answer. Sorry for not reading the link in your post above.

I’m working on an app that will have two versions and this link it’s certainly a good point to start. Thanks!

Greetings,

Paolo