I created my first android app in Expo, that i made the eject later on. I created the bundle and uploaded to the Google Play console, but in the list permissions appears:
android.permission.ACCESS_BACKGROUND_LOCATION,
android.permission.ACCESS_COARSE_LOCATION,
android.permission.ACCESS_FINE_LOCATION,
android.permission.ACCESS_NETWORK_STATE,
android.permission.ACCESS_WIFI_STATE,
android.permission.CAMERA,
android.permission.FOREGROUND_SERVICE,
android.permission.INTERNET,
android.permission.READ_APP_BADGE,
android.permission.READ_EXTERNAL_STORAGE,
android.permission.RECEIVE_BOOT_COMPLETED,
android.permission.SYSTEM_ALERT_WINDOW,
android.permission.WAKE_LOCK,
android.permission.WRITE_EXTERNAL_STORAGE,
android.permission.WRITE_SETTINGS,
com.anddoes.launcher.permission.UPDATE_COUNT,
com.android.vending.CHECK_LICENSE,
com.google.android.c2dm.permission.RECEIVE,
com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE,
com.google.android.gms.permission.ACTIVITY_RECOGNITION,
com.google.android.providers.gsf.permission.READ_GSERVICES,
com.htc.launcher.permission.READ_SETTINGS,
com.htc.launcher.permission.UPDATE_SHORTCUT,
com.huawei.android.launcher.permission.CHANGE_BADGE,
com.huawei.android.launcher.permission.READ_SETTINGS,
com.huawei.android.launcher.permission.WRITE_SETTINGS,
com.majeur.launcher.permission.UPDATE_BADGE,
com.oppo.launcher.permission.READ_SETTINGS,
com.oppo.launcher.permission.WRITE_SETTINGS,
com.sec.android.provider.badge.permission.READ,
com.sec.android.provider.badge.permission.WRITE,
com.sonyericsson.home.permission.BROADCAST_BADGE,
com.sonymobile.home.permission.PROVIDER_INSERT_BADGE,
me.everything.badger.permission.BADGE_COUNT_READ,
me.everything.badger.permission.BADGE_COUNT_WRITE
But in my AndroidManifest.xml i only have this:
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission tools:node="remove" android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_SETTINGS"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE"/>
<uses-feature android:name="android.hardware.camera" android:required="true" />
<uses-feature android:name="android.hardware.camera.front" android:required="false" />
Can anybody help me? Thanks!
Ok, I checked that the permissions that appear are merged with my AndroidManifest.xml in the build. These are permissions required by packages that I added to my project. To help check which packages are needed I go to android > app > build > outputs > logs > manifest-merger-release-report.txt.
Hope it help others with the same problem :)
Related
I have a Android app done with Delphi 10.4 (upgraded to 11.2).
I have lot of permission in my AndroidManifest.xml :
<uses-sdk android:minSdkVersion="23" android:targetSdkVersion="29"/>
<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_NETWORK_STATE"/>
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT"/>
<uses-permission android:name="android.permission.CALL_PHONE"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
<uses-permission android:name="android.permission.READ_CALENDAR"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.WRITE_CALENDAR"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE"/>
<uses-permission android:name="oppo.permission.OPPO_COMPONENT_SAFE"/>
<uses-permission android:name="com.huawei.permission.external_app_settings.USE_COMPONENT"/>
Then I ask for runtime permissions :
PermissionsService.RequestPermissions(
[JStringToString(TJManifest_permission.JavaClass.CAMERA),
JStringToString(TJManifest_permission.JavaClass.READ_EXTERNAL_STORAGE),
JStringToString(TJManifest_permission.JavaClass.WRITE_EXTERNAL_STORAGE),
JStringToString(TJManifest_permission.JavaClass.READ_PHONE_STATE),
JStringToString(TJManifest_permission.JavaClass.RECORD_AUDIO)
], ...
That's work perfectly, but when I want to publish my app, Play store ask to update my Sdk version to 31 (I replace 29 by targetSdkVersion="31")
I add exported=true when necessary and replace :
<uses-permission android:name="android.permission.BLUETOOTH"/>
// by
<uses-permission android:name="android.permission.BLUETOOTH" android:maxSdkVersion="30"/>
// and added BLUETOOTH_SCAN + BLUETOOTH_ADVERTISE + BLUETOOTH_CONNECT
On Android 13, permission are not asked correctly.
The first time I open the app, the application ask me to accept BLUETOOTH only and then nothing append, but the app still working and crash when I want use the Camera.
If I close the app and open it, then my application ask me for the others permissions (Camera, Read/Write, ..)
I try to put Bluetooth at the end of the file, but I got same problem.
If I use targetSdkVersion="29" as before, it's ok.
Based on the documentation I dont see what to do : https://developer.android.com/guide/topics/connectivity/bluetooth/permissions#declare-android12-or-higher
Thanks
I faced a similar issue. I had to move the code of asking for the permissions to different places. So when the application starts, I ask for Bluetooth permissions only. Before using the storage, I added to code to ask for the storage permission. Before using the camera, I did the same.
Our app fails to install after migrating to the targetSdkVersion 31. On trying to find the issue we found that a library was using FLASHLIGHT permission and we were getting this error while installing:
Installation failed due to: 'Failed to commit install session
130765275 with command cmd package install-commit 130765275. Error:
-127: Package com.xxxx.yyyy.zzzz attempting to declare permission android.permission.FLASHLIGHT in non-existing group
android.permission-group.HARDWARE_CONTROLS'
Permissions used in the manifest file of library:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<permission
android:name="android.permission.FLASHLIGHT"
android:permissionGroup="android.permission-group.HARDWARE_CONTROLS"
android:protectionLevel="normal" />
Is there any workaround to this issue?
android.permission-group.HARDWARE_CONTROLS is deprecated in targetSdkVersion 31 . The work around is to remove the permission used by library in your manifest by
<permission
android:name="permissionOne"
tools:node="remove"
tools:selector="com.example.lib1">
tools:node="remove"
will remove the permission from the App if its used in any of your libraries
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 got error INSTALL_FAILED_MISSING_FEATURE while installing my apps in emulator. I am unable to find out the where is the error. My app consists of both GPS & Camera features.
I am not getting where I am wrong. Is it problem with ANDROID MANIFEST????
Please Help me out due to this I am unable to deliver my app.Thank you
Updated
I am getting this error while installing in CONSOLE
[2012-03-16 11:24:50 - DemoCamGPS] Installation error: INSTALL_FAILED_MISSING_FEATURE
[2012-03-16 11:24:50 - DemoCamGPS] Please check logcat output for more details.
[2012-03-16 11:24:50 - DemoCamGPS] Launch canceled!
Here My logcat output details
03-16 11:24:49.351: W/PackageManager(59): Unknown permission android.permission.ADD_SYSTEM_SERVICE in package com.android.phone
03-16 11:24:49.361: W/PackageManager(59): Not granting permission android.permission.SEND_DOWNLOAD_COMPLETED_INTENTS to package com.android.browser (protectionLevel=2 flags=0x1be45)
03-16 11:24:49.361: W/PackageManager(59): Unknown permission com.google.android.gm.permission.WRITE_GMAIL in package com.android.settings
03-16 11:24:49.370: W/PackageManager(59): Unknown permission com.google.android.gm.permission.READ_GMAIL in package com.android.settings
03-16 11:24:49.381: W/PackageManager(59): Unknown permission com.android.providers.im.permission.READ_ONLY in package com.google.android.apps.maps
03-16 11:24:49.381: W/PackageManager(59): Unknown permission com.google.android.pushmessaging.permission.RECEIVE in package com.google.android.apps.maps
Here My ANDROID MANIFEST file
<uses-sdk android:minSdkVersion="8" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.FLASHLIGHT" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="com.android.browser.permission.READ_HISTORY_BOOKMARKS" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" >
</uses-permission>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" >
</uses-permission>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" >
</uses-permission>
<uses-feature android:name="android.hardware.camera" />
<uses-feature
android:name="android.hardware.camera.autofocus"
android:required="false" />
<uses-feature
android:name="android.hardware.camera.flash"
android:required="false" />
<uses-feature android:name="android.hardware.screen.landscape" />
<uses-feature
android:name="android.hardware.wifi"
android:required="false" />
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false" />
<uses-library android:name="com.google.android.maps" />
Please find out any wrong uses-feature ..
Can you post your manifest file? You're trying to use a feature( <uses-feature> ) the emulator doesn't have. My guess would be the camera.
Debug this by removing each uses-feature line one at a time until it installs without the error. The last line you removed will be the one causing this.
Are you using Google Maps, geocoding or anything related to that? If so, you should go to Project Properties > Android and link against the Google APIs for your desired API level.
If not using maps, what is the full error trace?
REMOVE BELOW USES FROM YOUR MANIFEST FILE & TRY IT.
<uses-feature android:name="android.hardware.screen.landscape" />
THIS HAPPENS COZ YOUR EMULATOR DOES'NT SUPPORT THIS FEATURES, OR TRY THIS FEATURES IT IN HIGHER VERSION API EMULATOR.
in android manifest add features android.hardware.screen.landscape to make app in horizontal view.
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?