android-securityexception

PickContact requires android.permission.READ_CONTACTS, or grantUriPermission()

家住魔仙堡 提交于 2019-12-11 09:59:25
问题 Some info first: I first created the app in Cordova: see Cordova permissions requires android.permission.READ_CONTACTS, or grantUriPermission() Now i created the app as a native Android app using Android Studio Builder, it has the same error. I'm using Android 6.0 ( SDK 23) According to the docs, ContactPick doesn't need permissions: http://developer.android.com/guide/components/intents-common.html#Contacts The result Intent delivered to your onActivityResult() callback contains the content:

throws SecurityException when signing with the default debug keystore

扶醉桌前 提交于 2019-12-11 01:52:54
问题 I am receiving a SecurityException since yesterday when I launch the service using signature protection level for permission with the default debug keystore. The strange thing is I wasn't receiving this error before yesterday and I didn't make any security related change. On the other hand, my own keystore using for releases is still working good. Related AndroidManifest.xml part: <permission android:name="com.my.app.privateservices" android:protectionLevel="signature" /> <service android

Dual apps can't access storage path /storage/emulated/999/Download/somefile.pdf

点点圈 提交于 2019-12-11 00:15:16
问题 I am trying to download a file from server to Download folder of andorid As expected it is working fine Problem When user clones my app (dual app) , the cloned app (2nd app) throws SecurityException: Unsupported path /storage/emulated/999/Download/somefile.pdf Research Device : Redmi 5 App : File Manager (system app) I found 2 options Internal Storage Storage for dual apps (it also has Download folder & other apps folder like Whatsapp) Still my app throws SecurityException 来源: https:/

How would a thread created by an app be considered a different app from the app's ContentProvider?

家住魔仙堡 提交于 2019-12-10 12:32:23
问题 I have an app that, when notified by a ContentObserver of a change to a ContentProvider , attempts to query the provider on a background thread. This causes an SecurityException to be thrown: 8-10 15:54:29.577 3057-3200/com.xxxx.mobile.android.xxx W/Binder﹕ Caught a RuntimeException from the binder stub implementation. java.lang.SecurityException: Permission Denial: reading com.xxx.mobile.android.mdk.model.customer.ContentProvider uri content://com.xxx.mobile.android.consumer.xxx/vehicle from

Unable to get phone number from device inspite of declaring required permissions in android manifest

放肆的年华 提交于 2019-12-10 12:22:39
问题 I am trying to get phone number from my device programmatically. I am trying with the following code: TelephonyManager tMgr = (TelephonyManager) getApplicationContext().getSystemService(Context.TELEPHONY_SERVICE); mPhoneNumber = tMgr.getLine1Number(); I have declared the below permissions in manifest file: <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission

Lock or turn off the screen programmatically

余生颓废 提交于 2019-12-08 04:17:27
I want to turn off / lock the screen of my device programmatically. For the moment, when I try : DevicePolicyManager mDPM = (DevicePolicyManager)getSystemService(Context.DEVICE_POLICY_SERVICE); mDPM.lockNow(); I have this error : java.lang.SecurityException: No active admin owned by uid 10176 for policy #3 This is my AndroidManifest.xml : <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="opteamit.com.belami" > <uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="com.google.android.c2dm

Lock or turn off the screen programmatically

流过昼夜 提交于 2019-12-08 03:56:45
问题 I want to turn off / lock the screen of my device programmatically. For the moment, when I try : DevicePolicyManager mDPM = (DevicePolicyManager)getSystemService(Context.DEVICE_POLICY_SERVICE); mDPM.lockNow(); I have this error : java.lang.SecurityException: No active admin owned by uid 10176 for policy #3 This is my AndroidManifest.xml : <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="opteamit.com.belami" > <uses-permission

Adding new uses-policies to existing device administrator on Android

ぐ巨炮叔叔 提交于 2019-12-07 13:35:32
问题 I have a device admin app that uses the following device-admin.xml <device-admin xmlns:android="http://schemas.android.com/apk/res/android"> <uses-policies> <watch-login /> <reset-password /> <force-lock /> <wipe-data /> </uses-policies> </device-admin> Some users has already activated the device admin permissions. Now, in an update of the app, I want to add a new uses-policy <limit-password /> I am wondering how to detect that new use policies have been added programmatically so that we push

Music Player asking for Write External Storage Permission?

人盡茶涼 提交于 2019-12-07 06:12:12
问题 I'm creating a music player application in Android. It works fine but whenever I scroll in songs list it starts crashing and gives this exception Process: com.example.lenovo.musicplayer, PID: 31100 java.lang.SecurityException: External path: /storage/emulated/0/Android/data/com.android.providers.media/albumthumbs/1460104607336: Neither user 10294 nor current process has android.permission.WRITE_EXTERNAL_STORAGE. at android.os.Parcel.readException(Parcel.java:1555) at android.database

Adding new uses-policies to existing device administrator on Android

夙愿已清 提交于 2019-12-05 21:32:36
I have a device admin app that uses the following device-admin.xml <device-admin xmlns:android="http://schemas.android.com/apk/res/android"> <uses-policies> <watch-login /> <reset-password /> <force-lock /> <wipe-data /> </uses-policies> </device-admin> Some users has already activated the device admin permissions. Now, in an update of the app, I want to add a new uses-policy <limit-password /> I am wondering how to detect that new use policies have been added programmatically so that we push the reactivation of the device admin permissions? AFAIK the only way is read your device-admin.xml