Publishing an app, problems with "Required device features" - android

I've published my app on the Market, but it somehow auto-detected several features that it thinks are required. One of those features is "android.hardware.telephony", and because this is now a required feature, my app can't be installed on wifi-only tablets.
I don't have any "uses-feature" declarations in the manifest file, but my app does have the capability to make calls. I guess that Google is requiring "android.hardware.telephony" because of this functionality. However, this functionality is just a value-added feature. It is by no means required for the core functionality of the app.
I don't want to completely remove the telephony functionality because there are way more users with phone devices vs. wifi-only devices. I also don't want to create and maintain another version of the app for wifi-only devices. Is there any way for me to mark telephony as an optional feature, so that both types of devices can use my app?

See http://developer.android.com/guide/appendix/market-filters.html and http://developer.android.com/guide/topics/manifest/uses-feature-element.html .
In your case add
<uses-feature android:name="android.hardware.telephony"
android:required="false" />
to your manifest.

Related

Why we need to use <uses-feature> attribute?

My question is related to camera. When an application needs to use the system camera, we create an intent with ACTION_IMAGE_CAPTURE action and add a permission like this in the manifest file.
<uses-permission android:name="android.permission.CAMERA"/>
But besides that, there is one such
<uses-feature android:name="android.hardware.camera"/>
What is it for? I read that if this line is written, then if the phone does not have a camera the application will not install. Is it true? And besides this, why do we need this?
And for what the line <uses-feature/> is generally responsible in manifest file?
<uses-feature android:name="android.hardware.camera"/>
above line will use to check the device have camera hardware.
When you upload an app on play store they will filter your app based on the feature for the specific device,
if any device will search your app on play store and that device doesn't have camera hardware then they will not be allowed to install an app on that device.
but if your requirement is to force download the app if the device doesn't have camara hardware the you can use :
<uses-feature android:name="android.hardware.camera" android:required="false"/>
the android:required = "false" will allow you to install
hope you understand
Google documentation for <uses-feature> itself clearly states:
Google Play uses the <uses-feature> elements declared in your app
manifest to filter your app from devices that do not meet its hardware
and software feature requirements.
By specifying the features that your application requires, you enable
Google Play to present your application only to users whose devices
meet the application's feature requirements, rather than presenting it
to all users.
Some permissions in Android are connected to some hardware/software features of a device, like CAMERA. Since every Android device in the market differs in its hardware and software configuration, there's a greater possibility that some feature that you're trying to add in your app doesn't support all Android Devices. If you try to use the camera in a camera-less device (a superficial assumption), then your app will not behave as you expect.
In short, if you want your app to only be available for the set of devices having that particular capability, then you can add <uses-feature> tag inside the manifest with the desired capability.
This is just for filtering apps in Play Store based on device configuration and support.
You can define zero or more <uses-feature> capabilities based on your need.
Note: If you don't want your app to get filtered out just for the sake of a feature that doesn't impact the overall user experience of the app, you can smartly disable the particular feature if it's not available in your app.
For that, you have to write
<uses-feature android:name="YOUR_NON_COMPULSORY_FEATURE" android:required="false" />
For example, if your app uses CAMERA feature, but your app is not dependent on that feature, you can disable just the CAMERA feature to provide a non-buggy user experience.
<uses-feature/> is there to guide Google play store to filter out this application from devices which do not have Camera hardware.
As a developer - lets ask this Question to ourself with respect to your app.
What will user do with my app whose phone does not have Camera?
If the answer to Above is "Not much" - then what is the point allowing user to install your app on phone if user can't do much with it? It is waste of time & Internet bandwidth for the user.
Also if user is really frustrated by eventually learning that this app is not much of use, they may RATE your app poorly on Play Store.
Hence its there is <uses-feature/> option to protect both developers & users from above scenario.
This is very important part. Let suppose your application uses a particular hard ware and that is essential for your app that hardware must be available on a device to use your application. If that is defined, your app will be filtered out for those devices that have that specific hard ware.
NOTE: As it is well documented over Google Developer site
**Google Play uses the elements declared in your app manifest to filter your app from devices that do not meet its hardware and software feature requirements.
By specifying the features that your application requires, you enable Google Play to present your application only to users whose devices meet the application's feature requirements, rather than presenting it to all users.**
Refer this link for further reference guide

android:what's the differences between the "required" in use-feature and the "requiredFeature" in user-permission?

There is the use-permission and use-feature like below:
<uses-permission android:name="android.permission.CAMERA" android:requiredFeature="false"/>
<uses-feature android:name="android.hardware.camera" android:required="false"/>
I am just not quite clear about the "android:requiredFeature" attribute. Is it the same effect as the "android:required" in use-feature?
I just cannot find the android:requiredFeature related infomation in the android developer site and google....
Yes more or less both have the same effect. android:requiredFeature is only used in API level 26 and higher if your app has minSdkVersion less than 26 the application will simply ignore the attribute.
<uses-permission> generally is used to specify a permission that a user must grant for the app to run correctly, it is not necessarily used to filter the app for devices on Google Play. If you want your app to be filtered for devices based on the hardware feature your app uses, the recommended way is to define <uses-feature> element in your manifest.
As mentioned in the other answer, based on <uses-permission> Google play can assume that your app requires the underlying hardware feature and it can filter your app based on that, but its not always true, your app might work without that hardware feature but it prefers to have that feature, So to avoid filtering based on <uses-permission>, android:requiredFeature attribute is used to enhance your control over the filtering.
I think this is the main cause of the difference, which is not really a difference but a more efficient case of managing what do you want the app store to do with your app.
In some cases, the permissions that you request through
can affect how your application is filtered by
Google Play.
If you request a hardware-related permission — CAMERA, for example —
Google Play assumes that your application requires the underlying
hardware feature and filters the application from devices that do not
offer it.
To control filtering, always explicitly declare hardware features in
elements, rather than relying on Google Play to
"discover" the requirements in elements. Then, if
you want to disable filtering for a particular feature, you can add a
android:required="false" attribute to the declaration.
For a list of permissions that imply hardware features, see the
documentation for the element.
from: Android developers

Does uses-feature limit App Store Downloads

I can seem to find anything on google, but if i add this setting to my manifest
uses-feature android:name="android.hardware.bluetooth_le" android:required="true"
will non ble devices such as anything less than 4.3 be able to still download the app off the store?
Regards
If you set android:required="true" then devices without that feature will not be able to see or download the application from the Play Store.
If you would like the app to be available for devices without that BLE feature then declare the feature with android:required="false". In this case you have to check manually if the feature is available or not.
Please check http://developer.android.com/guide/topics/manifest/uses-feature-element.html#market-feature-filtering and https://developer.android.com/guide/topics/connectivity/bluetooth-le.html for more details.

ACTION_IMAGE_CAPTURE and CAMERA feature

I'm using ACTION_IMAGE_CAPTURE to request camera app to take a photo.
According to official doc if my app uses camera feature but doesn't require it for correct functioning, following should be left in manifest
<manifest ... >
<uses-feature android:name="android.hardware.camera"
android:required="false" />
...
</manifest>
I don't really get what is the idea of having those lines in manifest, isn't it just the same without having this not required feature.
I would like to know what is the point to write this ? Can I safely skip this from manifest ?
Doesn't matter if I have the feature listed in manifest, I'll still be able to check it during run-time, correct hasSystemFeature(PackageManager.FEATURE_CAMERA) ?
No, it's not the same. As the docs say:
The element offers a required attribute that lets you specify whether your application requires and cannot function without the declared feature, or whether it prefers to have the feature but can function without it.
This means that it would be nice to have that feature, but the app will still work without it. For example, an app that can take pictures but that does not need it as part of its normal operation would use the required=false for the camera.
You might ask that through code, yes. But the problem is that some permissions imply that you require some particular hardware:
If an application requests hardware-related permissions, Google Play assumes that the application uses the underlying hardware features and therefore requires those features, even though there might be no corresponding to declarations. For such permissions, Google Play adds the underlying hardware features to the metadata that it stores for the application and sets up filters for them.
For example, if an application requests the CAMERA permission but does not declare a element for android.hardware.camera, Google Play considers that the application requires a camera and should not be shown to users whose devices do not offer a camera.
So if you want to use some features but not others, and you are including the permission, you might want to declare that your app does not really requires the presence of a certain device feature.
From Android docs:
The purpose of a declaration is to inform any external
entity of the set of hardware and software features on which your
application depends.
In general, you should always make sure to declare
elements for all of the features that your application requires
<uses-feature android:name="android.hardware.camera"
android:required="false" />
If required = "false" is given in manifest then app uses a camera but it’s not mandatory for the application to work, and all device can install app from play store whether device has camera feature or not.
if required = "true" is given in manifest then device which has camera feature can only use app other devices which do not have camera feature not able to install from google play store.
This allows Google Play Store to filter out apps for devices that don’t have their required features.
I hope it helps!

make app universally compatible for device with and without camera

I face a strange problem,
My application works perfectly on devices with or without a camera; only a few functionalities are not available if you don't have a camera.
After uploading my app to the play store, the play store excluded some devices without a camera in which the app actually works fine!
By using this permission:
<uses-permission android:name="android.permission.CAMERA"/>
play store auto excludes.
Has anybody faced similar problems?
Sorry if this is a duplicate (I hope it is not).
From the docs:
In some cases, the permissions that you request through can affect how your application is filtered by Google Play.
If you request a hardware-related permission — CAMERA, for example — Google Play assumes that your application requires the underlying hardware feature and filters the application from devices that do not offer it.
To control filtering, always explicitly declare hardware features in elements, rather than relying on Google Play to "discover" the requirements in elements. Then, if you want to disable filtering for a particular feature, you can add a android:required="false" attribute to the declaration.
So, just add this to your manifest:
<uses-feature android:name="android.hardware.camera" android:required="false"/>
I know at least for features there is an option to set if it isrequired or not . You could try that.
Just add required=false in the permission declaration.

Categories

Resources