Release build of an app is perfectly working on Android 4.0.3 and 4.4.2 which api levels are 15 and 19. But when I try to run it on android 5.0.1 and above it shows a grey screen only even without an appbar. I am using Google Maps, Microsoft Azure simple app and support library.
My manifest uses-permissions
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
And my manifest's uses-features
<uses-feature android:name="android.hardware.location" />
<uses-feature android:glEsVersion="0x00020000" android:required="true"/>
<uses-feature android:name="android.hardware.screen.portrait" />
Related
Android app is not showing when tried to install on LG Leon (H345) phone from T-Mobile using Google Play Store. I have checked version, min app version is Android 4.4 where as phone is on 5.1.1. Here are permissions in the AndriodManifest file.
<uses-sdk android:targetSdkVersion="19" android:minSdkVersion="19"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-feature android:name="android.hardware.camera" android:required="true"/>
<uses-feature android:name="android.hardware.camera.autofocus" android:required="true"/>
<uses-feature android:name="android.hardware.telephony" android:required="false"/>
<uses-permission android:name="android.permission.BLUETOOTH" android:required="true"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
This is because autofocus is not present on LG LEON H345 and you've made it a required field in the manifest here:
<uses-feature android:name="android.hardware.camera.autofocus" android:required="true"/>
If you change this to below and re-upload, it will show:
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/>
For more, check out the android:required docs:
When you declare android:required="true" for a feature, you are specifying that the application cannot function, or is not designed to function, when the specified feature is not present on the device
So if you've made a feature mandatory, play store doesn't show the app on devices which don't have that feature.
I have a serious problem concerning the compatibility of my app with some devices.
At the moment these are my configurations and permissions:
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="19" />
<supports-screens android:anyDensity="true" />
<uses-permission android:name="com.android.vending.CHECK_LICENSE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
This would in my opinion mean that my application is compatible with every smartphone (not tablet) with Android 4.0.x or higher. Is that correct?
Because I recognized that it is not compatible with Samsung Galaxy S II with 4.1.1 which I simulated with Genmyotion. Also our customer described this beviour on a real device. Does anyone of you know why this problem could occur?
I think I have found the problem by myself (see android market says no device compatible?)
I have included permission
<uses-permission android:name="android.permission.CAMERA"/>
which by default includes auto focus feature. So I have to add the following in my manifest to disable it:
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/>
Thanks to chrish
I have published an app on Google Play Store but when I try to download it on Tablet, it says, app is not compatible.
Also, in developer console, I get this message: Your layout should make use of the available space on 7-inch tablets
Now, 1st thing , I want to lock app to only portrait orientation and hence screen usage will be almost same.
Here's the link of the app.
Some imp info about the app:
android:minSdkVersion="10"
android:largeScreens="true" AND android:xlargeScreens="true"
To support Tablets, android docs says, check if minSdkVersion is declared with value 11 or higher. , but what if I want to support devices with OS 2.3.3 ?
Please give appropriate advice.
Edit
Is this ok?
<uses-permission android:name="android.permission.CAMERA" android:required="false"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.SEND_SMS" android:required="false"/>
<uses-permission android:name="android.permission.READ_CONTACTS" android:required="false"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
Edit 2
After updating permissions part of manifest file as following, app is showing up in tabs also:
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.SEND_SMS"/>
<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-feature android:name="android.hardware.camera" android:required="false" />
<uses-feature android:name="android.hardware.telephony" android:required="false" />
<uses-feature android:name="android.hardware.screen.portrait" android:required="false" />
it says, app is not compatible.
It is showing error on device not only because minSDKversion but also google play concern about your given permission on the manifest file as well.
Like if you entered something like:
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
Your tab will not support it.
So instead of using uses-permission use <uses-feature>. And in java file check for it that your needed hardware is available or not.
For <uses-feature> see the below link:
http://developer.android.com/guide/topics/manifest/uses-feature-element.html#features-reference
Edited:
<uses-permission android:name="android.permission.CAMERA" android:required="false"/>
<uses-permission android:name="android.permission.SEND_SMS" android:required="false"/>
<uses-permission android:name="android.permission.READ_CONTACTS" android:required="false"/>
Nope you can't give permission like this because uses-permission not allowed android:required="false". Although It will not through any error it will not work.
If you will use <uses-feature> it will take the permission to access the specific hardware.
So use this:
<uses-feature android:name="android.hardware.camera" android:required="false"/>
<uses-feature android:name="android.hardware.telephony" android:required="false"/>
And not to forget to check this feature availability in your java code. If you will not check it, CAMERA, SEND_SMS wont work in your app.
To check camera availability use this:
import android.content.pm.PackageManager;
PackageManager pm = context.getPackageManager();
if (pm.hasSystemFeature(PackageManager.FEATURE_CAMERA)) {
// Do you camera work here.
}
I used google map v2 in my android application, i created my api key in the google console.
But always i have this result in the emulator :
someone help me please ?
First make sure you have internet access with your simulator.
Then make sure you have the following in your manifest:
<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="YOUR_API_KEY"/>
<permission
android:name="com.example.mapdemo.permission.MAPS_RECEIVE"
android:protectionLevel="signature"/>
<uses-permission android:name="com.example.mapdemo.permission.MAPS_RECEIVE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<!-- The following two permissions are not required to use
Google Maps Android API v2, but are recommended. -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
And opengl2:
<uses-feature android:glEsVersion="0x00020000" android:required="true"/>
DOC HERE
If this is still not ok, then try to use GENYMOTION emulator (with google apps).
Hope this will help you.
I am getting the following error when I am trying to install my app on my HTC device.
Package com.org.activities requires unavailable feature
android.hardware.sdcard; failing!
However, I do have my SD card in my device.
Here is the code I have written in my manifest file:
<uses-sdk android:minSdkVersion="8" />
<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_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.FLASHLIGHT"/>
<uses-permission android:name="android.permission.WRITE_INTERNAL_STORAGE"/>
<uses-feature android:name="android.hardware.sdcard" android:required="true"/>
<uses-feature android:name="android.hardware.camera" android:required="true"/>
What's wrong with it? I need to check for these features as I am using an SD card and the camera for my app.
This hardware feature does not seem to exist. I can't find it in the reference?
http://developer.android.com/guide/topics/manifest/uses-feature-element.html#hw-features
How did you arrive at this feature name?