I am having an issue with sqlite db in Android. But as I made a quick research on the internet, I suspect that the problem is not related to sqlite but system user. My app is not recognized as authorized user to access db functionalities. I tried to apply possible suggested solutions in stack overflow but none of them made a difference. This is the LogCat I am facing every time I attempt to use db functionality.
12-14 02:35:17.721 2953-3355/? E/DatabaseUtils﹕ Writing exception to parcel
java.lang.SecurityException: Permission Denial: get/set setting for user asks to run as user -2 but is calling from user 0; this requires android.permission.INTERACT_ACROSS_USERS_FULL
at com.android.server.am.ActivityManagerService.handleIncomingUser(ActivityManagerService.java:13082)
at android.app.ActivityManager.handleIncomingUser(ActivityManager.java:2038)
at com.android.providers.settings.SettingsProvider.callFromPackage(SettingsProvider.java:577)
at android.content.ContentProvider$Transport.call(ContentProvider.java:279)
at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:273)
at android.os.Binder.execTransact(Binder.java:388)
at dalvik.system.NativeStart.run(Native Method)
I tried to add permission
android.permission.INTERACT_ACROSS_USERS_FULL
but still no sound. The strange thing is when I try to add INTERNET permission Android Studio 0.3 (ide I use) suggests me possible permissions I can choose. But when it comes to INTERACT_ACROSS_USERS_FULL permission it behaves like it has no idea about this permission. My test device is Samsung S4 running on 4.3.
I assume that I am not the only one who tries to use db on android. So there is a solution.
How can I really add INTERACT_ACROSS_USERS_FULL permission to my application?
According to this answer: android.permission.INTERACT_ACROSS_USERS_FULL is a signature level permission. Your app will not be able to use it until and unless it has the same signature as the system.
Which is not something you can achieve unless you either are the creator or the system build, or collaborating with them such that they are willing to sign your apk with their certificate. In other words, this is off limits for most developers.
I got the error android.permission.INTERACT_ACROSS_USERS_FULL because I had some conflicts in the bin directory of the project. I did some changes to the my app package id and the app-file-1.apk in the bin directory doesn't match with the project.
I did a project > clean and checked that the bin folder was cleared and regenerated, and it works now.
I had the same issue and think that I can help you out. I had registered my app with my production keystore, but was using Eclipse debug to load it into my phone. The Eclipse debug uses debug.keystore which wont match the signature of your production key and throw this error. Use the debug keystore instead for testing or send the apk to yourself and download it onto your phone.
I get this error when I change my minSdkVersion from 8 to 11 in my Manifest. I changed it back to 8 or 9 and no more error.
Try changing your minSdkVersion in your manifest. I was able to repeat the crash and error results with versions 10, 11, and 12 (my app crashes and displays "requires android.permission.INTERACT_ACROSS_USERS_FULL" in the LogCat)
Try to disable auto-fill. It works 100% on Android Oreo. Check this link
Simply add this code to your app :
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
window.decorView.importantForAutofill =
View.IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS;
}
Related
In Application i haven't using the location but while uploading the application in playstore i am getting below warning, recently i implemented In-app updates, as per my knowledge in-app updates not required location permission.
Screenshot of warnings
New Permission Added warning: use that have the APK with version code 20 may need to accept the android.permision.ACCESS_FINE_LOCATION permission, which may result in them not upgrading to this version of the app
Tip : Ensure that the new permissions are necessary, and consider mentioning these permissions in the What's new in the release text
This permission must be coming from any of your dependencies. to check where it's coming from open your AndroidManifest.xml file and click on the merged manifest tab to see final Manifest version after merging all manifest from dependency. you can even check every dependencies manifest my clicking on the library name on the left-hand side.
Refer to the image
as per your screenshot location permission is detected in v21.
message from apk v21-
Check your manifest again and ensure there is not ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION or any other location related permission you have mentioned.
do CTRL + SHIFT + S and type location see if you find anything related location.
message from apk v20- because you have increased minSdkVersion to a higher number.
I have the following code-lines:
FingerprintManager fm = activity.getSystemService(FingerprintManager.class);
fm.isHardwareDetected();
At this Point, Android Studio complains about a missing permssionCheck (checkSelfPermission).
Call requires permission which may be rejected by user: code should explicitly check to see if permission is available (with checkPermission) or explicitly handle a potential SecurityException
However, as I understand the Documentation, USE_FINGERPRINT (required by FingerprintManager) is not a "dangerous" permission and thus is granted at install time. If I suppress the AndroidStudio warning everything works fine on my test devices.
Is this a bogus warning?
Did you add the permission to your Manifest file already? You don't need to request the permission at runtime, but you still need to have the manifest entry.
This clearly seems to be an AndroidStudio bug. I have added
//noinspection MissingPermission
to supress this warning, and there are no negative consequences.
I'm looking for a quick way to identify missing Android permissions. According to Android Tools Project Site here: http://tools.android.com/tips/lint-checks, Android Studio 1.4 is able to check MissingPermission:
MissingPermission
Priority: 9 / 10 Severity: Error Category: Correctness
This check scans through your code and libraries and looks at the APIs
being used, and checks this against the set of permissions required to
access those APIs. If the code using those APIs is called at runtime,
then the program will crash.
Furthermore, for permissions that are revocable (with targetSdkVersion
23), client code must also be prepared to handle the calls throwing an
exception if the user rejects the request for permission at runtime.
However, when I try ./gradlew lint check MissingPermission, the output is:
Task 'MissingPermission' not found in root project 'Android'.
(I have to use the command line because AS always freezes when I use Analyze - Inspect Code from UI.)
If I run ./gradlew lint, Lint report doesn't complain missing permission even if I remove android.permission.INTERNET.
Any ideas on this Lint option?
I'm making a watch face that I'm planning on publishing soon, but I'm having trouble getting the wearable component to install when the mobile side is (kind of important :p). Here's part of the stack trace from the watch I'm testing on when I installed the signed apk with the embedded wearable apk onto my Nexus 5X running Android Marshmallow:
10-13 20:43:50.293 2279-8109/? I/PkgMgrInstallUtil﹕ Sending install intent to PackageInstaller Intent { act=android.intent.action.INSTALL_PACKAGE dat=content://com.google.android.clockwork.home.provider/host/com.twintitanium.watchfaces.cardswatchface/wearable/com.twintitanium.watchfaces.cardswatchface/apk typ=vnd.android.cursor.item/wearable_apk cmp=com.android.packageinstaller/.wear.WearPackageInstallerService (has extras) } forcom.twintitanium.watchfaces.cardswatchface
10-13 20:43:51.168 7981-8110/? W/WearPkgInstallerService﹕ Wearable com.twintitanium.watchfaces.cardswatchface has a permission "android.permission.WRITE_EXTERNAL_STORAGE" that is not granted in the host application.
10-13 20:43:51.168 7981-8110/? W/WearPkgInstallerService﹕ Wearable com.twintitanium.watchfaces.cardswatchface has a permission "android.permission.READ_EXTERNAL_STORAGE" that is not granted in the host application.
10-13 20:43:51.168 7981-8110/? W/WearPkgInstallerService﹕ Wearable com.twintitanium.watchfaces.cardswatchface has a permission "android.permission.GET_ACCOUNTS" that is not granted in the host application.
Indeed, if I go to the installed app on my phone (Cards Watch Face) under settings, I see that 2 permissions, Contacts and Storage, are disabled.
Seems pretty self-explanatory, except that I don't have any of these permissions in my wearable manifest - I only have "com.google.android.permission.PROVIDE_BACKGROUND" and "android.permission.WAKE_LOCK," since they are required for watch faces. And if I try to add these permissions to my mobile and wearable manifests, it still gives the same errors.
This is a new issue, because I had a beta version on the play store that worked, but then I updated to API 23. What could be causing this?
Check your build.gradle files: if you have a dependency on 'com.google.android.gms:play-services:8.1.0', it apparently implicitly adds permissions (in this case, Contacts and Storage) since Google Play Services 7.5. Changing that dependency to the specific component 'com.google.android.gms:play-services-wearable:8.1.0' will get rid of these permissions (and make your apk smaller since it won't include libraries it doesn't use).
I am working on integrating micode's open source compass into an app I am making. I am wondering how I can fix this here permission error when I clearly have it stated in my manifest with the correct spelling. Its still coming up that I need that permission.
This is puzzling me...
11-03 13:53:58.241: E/AndroidRuntime(8975): Caused by: \
java.lang.SecurityException: Permission Denial: registerReceiver from \
net.micode.compass asks to run as user -1 but is calling from user 0; this \
requires android.permission.INTERACT_ACROSS_USERS_FULL
android.permission.INTERACT_ACROSS_USERS_FULL is a signature level permission. Your app will not be able to use it until and unless it has the same signature as the system.
I had a same problem and i did project -> clean. It works now.
I know there is already an accepted answer but for some reason its not working (or no longer working) on my part.
This error happened to me on Android SDK version 19 and lower, because of NDK that was part of my app.
I just deleted few codes that are connected with NDK codes at the Android Manifests file.
I disabled autofill and project started to work normally. Check this link
Just add this code to your app :
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
window.decorView.importantForAutofill =
View.IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS;
}