I want to exclude my app from beeing available in Android TV devices.
What should I add to my Manifest to filter those devices?
Tried
<uses-feature
android:name="android.software.leanback"
android:required="true" />
but it does just the opposite thing (app only available for Android TV)
<uses-feature> is about what your app needs or uses, so it is a positive selector rather than negative.
You cannot say "I want only devices that do not have this".
As for Android TV, it may be possible to filter them out if we take into consideration that most TVs would not have Touch controls. Which means that if you set in your manifest:
<uses-feature
android:name="android.hardware.touchscreen"
android:required="true" />
Then your app will not be shown on at least majority of Android TV devices.
Although M. Prokhorov answer is more accurate, I'd like to add some more info about this.
If you are interested in uploading for the Google Play Store, you can go to Google Play Console-> Release Management -> Device Catalogue. From there you can exclude devices from seeing your app. You can pick devices one-by-one from "all devices" or you can apply some filter like SDK version or screen size.
This is however only a "visibility" feature, which means in theory a device you have excluded can "fake" its features and download your app. Actually, if I'm not wrong, I think on the Play Store you get a pop-up saying "your device does not support this app, continue anyway?".
Related
I have created an Android TV app that works as expected on my ADT-1. However, I've found it also works on my Nexus 10 and Nexus 4 devices (although it's not really usable on the Nexus 4 because you can't see enough on the screen) if I install it using ADB.
When I publish it on Google Play in beta test mode, I can actually install it on all 3 devices. But the icon only shows up on the ADT-1, and I can only launch it from there. It doesn't show up as an installed app on the other devices, and within Google Play there is no launch option, only Uninstall.
So I either need it to work on tablets, where it actually looks OK, or not allow people to install it except on an Android TV device. However, Google Play actually requires you to upload screenshots of both Android TV and 10 inch tablets. So what am I missing?
Per the Get Started with TV Apps leanback section:
Declare that your app uses the Leanback user interface required by Android TV. If you are developing an app that runs on mobile (phones, wearables, tablets, etc.) as well as Android TV, set the required attribute value to false. If you set the required attribute value to true, your app will run only on devices that use the Leanback UI.
<manifest>
<uses-feature android:name="android.software.leanback"
android:required="false" />
...
</manifest>
Set that to true if you only want the app to appear on Android TV devices.
I uploaded my application on Google Play Store. I could search for it and install on almost every device. Except on Samsung Galaxy Y Duos s6102
After searching for a solution, few things i found out:
Problem with uses-features in the Manifest:
I am having only 2 features in the Manifest
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
But the device has a Camera, so this might not be the case.
Problem with support-screens in the Manifest:
I haven't added any such tag in my Manifest, assuming that by default all Screens are supported. And confirmed that from the developer's console
I found out that QVGA Screens are not supported by default, you have to explicitly declare them.
But QVGA screens come under Small Screen as stated here:
Then thought density might be the reason, but from the docs:
For applications that support Android 1.6 (API level 4) and higher, this is "true" by default and you should not set it "false"
So, are there any other reasons for this Issue? Or should i try adding them all to my Manifest file.
In the link provided to the device specifications, it states that the camera is 'fixed focus'.
When you add a uses-feature entry in your manifest, that feature is required and will block devices on Google Play which don't have it. As long as it doesn't break anything or make features non-functional like a barcode scanner in the case of 'autofocus', adding required=false should be fine.
I developed and android application and uploaded in google play for mobiles. Now i did the tablet version with same functionality. In my tablet version i used <uses-feature android:name="android.hardware.telephony"> attribute which is used for phone calling services. I developed my application for both calling supported and unsupported tablets.Here i want to show my tablet version for only tablets even those are enabled/disabled with calling functionality.
I know one thing like below which will filter application play store and show the application only for android mobiles.
<uses-feature android:name="android.hardware.telephony" android:required="true"/>
Is there any other way which will filter my application and make available for only tablets( calling function enabled/disabled)
Please advice me.
Thanks in advance.
you can put on your manifest the support screen size xlarge and then the phone version you put support screen size small, medium, large.
Also you can check on the google play publish site the multiple APKs thing. I never used by I reckon it's used exactly for that.
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.)
Add a <compatible-screens> element to your manifest, outlining the specific screen sizes and densities that you support.
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).
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.
If i have an application that needs to make calls and want to make another version that doesnt use it (to enable it to work on tablets wifi only - and also to enable uses to install it from the market of course) how can i do it?
Multiple APK Support of the Android Market will not help me as it only allows multiple APKS if they have any of the following different:
OpenGL texture compression formats
Screen size (and, optionally,screen density)
API level
Will I need to have 2 differente applications?! (That's lameee).
Can i foul the problem/market by compiling versus 2 different APIs (2.0: to the app without phone permissions and 2.1 to the app with phone permissions) but setting the minVersion of both to 1.6 so they both work on the same devices?
Even if it accepts this.. will the market show the correct version to the devices?
If you want to have support for calls but you don't want devices without call to be excluded you don't need to have two APK's.
Just add this line to your manifest:
<uses-feature android:name="android.hardware.telephony" android:required="false" />
This will state that the application will use telephony if it is available.
The question is very generic, since you don't expose which parts of your application need to do calls.
As a suggestion, you could avoid to link with the calls module by doing the following:
PackageManager pm = root.getContext().getPackageManager();
boolean telefon = pm.hasSystemFeature(PackageManager.FEATURE_TELEPHONY);
If telefon is equal to false, the application do not support telephone calls and therefore you shouldn't show the calling module.