How to Support Application On Device without Camera Feature - android

I have an android application currently on the play store. Although the device runs perfectly well on all devices, I was trying to enable support for some Zebra devices that do not have camera support. Because the application has a camera feature and the device does not, the application shows not supported in the play store.
My question is, is there any way for me to enable the app for use on that device or bypass/not-require the camera permission for that specific device. I did research on this but found minimal information. So to sum it up, I am looking for a way to support my application on a device with no camera feature, and only use the camera permission if the device has a camera. Any help would be appreciated!
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.25" android:installLocation="auto" package="com.some.package" android:versionCode="52">
    <uses-sdk android:minSdkVersion="19" android:targetSdkVersion="32" />
<application android:label="CM Mobile NG" android:theme="#style/HideTitleAndActionBar" android:icon="#drawable/icon_app" android:hardwareAccelerated="true"></application>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.hardware.camera" android:required="false"/>
<uses-permission android:name="android.hardware.camera.autofocus" android:required="false" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.FLASHLIGHT" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
</manifest>

Related

<uses feature> tan in android

<uses-permission android:name="android.permission.PHONE_STATE" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission
android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_USER_DICTIONARY" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.READ_USER_DICTIONARY" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" />
<uses-feature
android:name="android.hardware.location"
android:required="false" />
<uses-feature
android:name="android.hardware.location.gps"
android:required="false" />
<uses-feature
android:name="android.hardware.location.network"
android:required="false" />
<uses-feature
android:name="android.hardware.wifi"
android:required="false" />
<uses-feature
android:name="android.hardware.telephony"
android:required="false" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
I have basically declares this in the manifest. I want to know what exactly uses feature does.
From my understanding, if i declared permission access_coarse_location and all that, this means my app uses feature android.hardware.location ..and for that automatically thats set for true.
By specifying that feature to false, am telling android store..that a user can download this app even if he doesn't have location hardware..because this thing is handled inside code?
Is my understanding right? Because i find it funny there is feature android.hardware.wifi ..
what phone, mobile device doesn't have a wifi?
yup your understanding is correct.
From https://developer.android.com/guide/topics/manifest/uses-feature-element:
Google Play uses the elements declared in your app
manifest to filter your app from devices that do not meet it's
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
I want to know what exactly uses feature does
Quoting the documentation:
The purpose of a declaration is to inform any external entity of the set of hardware and software features on which your application depends. 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. Because feature support can vary across Android devices, the element serves an important role in letting an application describe the device-variable features that it uses.
Here, "external entity" usually means an app distribution channel, like the Play Store.
Is my understanding right?
Yes. One role of <uses-feature> is to indicate that some feature is not required, where a permission would imply that it is required.
Because i find it funny there is feature android.hardware.wifi .. what phone, mobile device doesn't have a wifi?
There is no requirement that Android devices support WiFi. For example, Android is used in vehicles, from cars to the Boeing 787 Dreamliner, and those environments may not offer WiFi.
You are correct in your understanding. The uses tag is mainly for filtering on the play store. Which means that users who may have a device that doesn't support a required feature that your app depends on, will not see your app in the listings.
As an aside. There are plenty of Android devices which don't feature a wireless chipset. I've been working with Android based Barcode scanners that don't have Wifi, nor GPS services. It's always best to handle things in code, depending on what the device is capable of.
Hope this helps.

How to access the phone's screen like "Chromecast APP"?(Mirroring)

I want make mirroring without WiFi-direct.
like chromecast mirroring function.
Chromecast application can access screen without
rooting&wifi-direct.
I found "capture_video_output" permission at API 19, but I can`t found any API.
So, I decompiled chromecast, but it hasn't "capture_video_output" permission.
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
Is it right way for mirroring?(wifi-display)
How can I make mirroring application?
Or where can I get this info?
You can use Presentation APIs to mirror a view within your app (can be a virtual view) to a chromecast device if mirroring is happening. Otherwise, there is no API for you to mirror phone's screen to a chromecast device.

Android uses-feature in tablet

I have android app with next permissions
<!-- Permissions -->
<uses-permission android:name="android.permission.ACCESS_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
But in my samsung tablet i've got This app is not comptable with your tablet. Android 4.2.2
What "uses-feature" I should set as
android:required="false" ?
I'm not sure if the Samsung tablets can vibrate or not, but if they can't, you will need to switch
<uses-permission
to
<uses-feature
And use the required flag. If it is not required, it won't be necessary and will not be filtered because of it. You will have to handle this for tablets that can't vibrate in code if part of your app handles vibrate. If it is not vibrate, then another one of these will be causing the issue and will need to change to uses-feature.
See Uses-Feature
On a secondary note, you should also check you're supporting the larger screen sizes with and not accidentally omitting xlargescreens from the manifest.

My app is not available for Kindle Fire HD, and I don't know why

I have an app on the Amazon App Store, and it has recently come to my attention that users with the Kindle Fire HD are not seeing it on their store. It is available for the 1st-gen Kindle Fire, so I assume this is some kind of filtering on the part of the App Store. I'm guessing that something in my manifest is marking it as incompatible with the Fire HD, but I have no idea what that could be. Here is all of the relevant hardware configuration info from my manifest:
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" />
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:xlargeScreens="true" />
<uses-feature android:name="android.hardware.touchscreen" >
</uses-feature>
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
<uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />
<uses-permission android:name="android.permission.READ_SYNC_STATS" />
<uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
<uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
Can anyone see any problems there that might make Amazon think it is incompatible with the Fire HD?
According to this Kindle Fire guide, you aren't supposed to use the READ_PHONE_STATE permission. Maybe your app got in before they started doing this check, but they apply it now to the new devices?
But if I were you'd I'd contact them and see if you can get the reason directly.
Some permissions implicitly add specific <uses-feature> entries to your manifest. While READ_PHONE_STATE is not listed in the Google docs, MODIFY_PHONE_STATE is listed as one of the permissions that implicitly triggers the android.hardware.telephony feature, so I wouldn't be surprised if READ_PHONE_STATE also does the same. I would assume this is the reason why your app is filtered for the Kindle Fire HD. (And it should be filtered for the Kindle Fire as well, but I'd assume it used to not be and they don't want to change it for legacy reasons).
You can try resubmitting with either that permission removed, or adding an explicit line to mark the telephony feature as optional:
<uses-feature android:name="android.hardware.telephony" android:required="false" />

How to see that exacly is missed on device when Android Market filters out apps?

I have Archos tablet which cannot access my app from the Market because it filters it out from the search. The app uses-feature are very unstrict, SDK version should be OK, so I have no ideas what else is missing.
Is there a way to get Market (or 3rd party app/site) to say what hardware/software features are present on device and what are required by Market filters for my app?
my requirements are
<uses-feature android:name="android.hardware.wifi" android:required="true"></uses-feature>
<uses-feature android:name="android.hardware.location" android:required="true"></uses-feature>
<uses-feature android:name="android.hardware.location.network" android:required="false"></uses-feature>
<uses-feature android:name="android.hardware.location.gps" android:required="false"></uses-feature>
<uses-feature android:name="android.hardware.touchscreen" android:required="true"></uses-feature>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"></uses-permission>
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"></uses-permission>
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"></uses-permission>
<uses-permission android:name="android.permission.VIBRATE"></uses-permission>
<uses-permission android:name="android.permission.READ_LOGS"/>
Furthermore, Market says that Archos 101 internet tablet matches, but 70 not (which is basically the same but smaller)
Did you use any telephony features? phone calls/sms? My guess is that the tablet doesn't support such features that causes it to be filtered. to "bypass" that you can try adding this in the permissions
<uses-feature android:name="android.hardware.telephony" android:required="false" />
android:required is set to true implicitly to say that the app cannot function without this permission which should most probably be the reason why the app isn't shown.

Categories

Resources