I believe I've found a way of doing this via a Stack Overflow question from 
someone who wanted to restrict their app to only running on Android TV:
http://stackoverflow.com/questions/25152048/restrict-android-application-to-android-tv

The fix was to include:
<uses-feature android:name="android.software.leanback" 
android:required="true" />

in the manifest of the Android TV version (and to set its versionCode 
higher than the other build). With that the Google Play Developer Console 
shows the TV build only being applicable to ~11 devices or so, which seems 
right. The TV devices are still eligible for the non-TV build too, but 
because the versionCode of the TV build is higher I believe that will make 
them download that one. I haven't published yet, so I can't say for sure if 
this will work properly, but everything looks good in the Developer Console.

On Tuesday, 21 July 2015 20:12:38 UTC+1, Jon Colverson wrote:
>
> Hello.
>
> I'm getting ready to release a game that's compatible with both 
> touchscreen devices and Android TV devices. On Android TV, the gameplay 
> isn't suitable for control with just a dpad, so I'd like to 
> add <uses-feature android:name="android.hardware.GAMEPAD" /> to my manifest 
> so that buyers can see that up front and (presumably) will be stopped from 
> buying it if they don't have the appropriate hardware.
>
> But the problem is that the game also has touchscreen controls for phones 
> and tablets, so on those devices the gamepad isn't required. What I'd 
> really like to be able to do would be to say that *either* a gamepad or a 
> touchscreen are required, but there doesn't seem to be a syntax for that.
>
> I thought that using multiple APKs might do the trick, and I set up one 
> with the Android TV LEANBACK_LAUNCHER intent filter and with gamepads set 
> to required, and another without the Android TV intent filter and with 
> gamepads set to optional. Unfortunately, though, when I uploaded them to my 
> draft entry on Google Play, both APKs showed compatibility with the same 
> number of devices, so it seems that the filtering doesn't currently work to 
> separate an Android TV build from a build for other devices.
>
> Is there any other way of achieving this, other than just being clear what 
> the requirements are in the Play listing and hoping people read it? :)
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to