android-permissions

Can I detect that a particular permission has been removed for my android app?

谁说胖子不能爱 提交于 2019-12-03 20:15:42
问题 So with the arrival of Android 4.3 comes the ability to selectively disable particular permissions for apps. This could obviously cause problems where an app loses a permission it needs to operate correctly. Does the system broadcast a message when a permission is revoked, or how could I tell that my app no longer has a certain permission? Ideally I would like to inform the user that turning off permission A will break xyz in the application. 回答1: There is no broadcast, but you can check

Is READ_LOGS a normal or dangerous Android permission?

让人想犯罪 __ 提交于 2019-12-03 17:30:39
问题 I am getting very conflicting information regarding the use of android.permission.READ_LOGS Android permission. Firstly, the Android Documentation website does not specify the protection level of this permission. It is neither classified as normal, nor dangerous. They do specify the following: "Not for use by third-party applications, because Log entries can contain the user's private information." Some websites say not to use it for the same privacy concerns. However I have some issue with

How to edit already present file in SD CARD using SAF(storage access framework)?

有些话、适合烂在心里 提交于 2019-12-03 17:21:23
I have a doubt I read these tutorials just to get the clear understanding of the SAF introduced in kitkat in higher version of android How to use the new SD card access API presented for Android 5.0 (Lollipop)? How to persist permission in android API 19 (KitKat)? Android API below 19 equivalent for ContentResolver takePersistableUriPermission Android Gallery on KitKat returns different Uri for Intent.ACTION_GET_CONTENT Now i have a question when the intent is fired and i get select the sd card to get the uritree from the intent which i am getting but is the root tree I will have to iterate

WhatsApp could access SMS without having permission to it

☆樱花仙子☆ 提交于 2019-12-03 16:19:26
I have not granted SMS permission to WhatsApp on my device HonorView10 running on EMUI9 . Recently I changed the number registered with WhatsApp and it send the verification code to new number (the sim is on same device as it is dual SIM). WhatsApp read the SMS and completed the verification process. Is it possible in Android to read SMS without permission? Or it is bug in EMUI9? I am just curious. WhatsApp could access SMS without having permission to it I think whats app is using SMS Retriever API SMS Retriever API With the SMS Retriever API, you can perform SMS-based user verification in

Analyze code with Lint for calls that require permissions

纵然是瞬间 提交于 2019-12-03 15:42:25
I am setting my targetSdkVersion to 23 and therefore I want to implement "Requesting permissions at runtime". (see here ) Lint directly calls out if you forget to check the permission and tells you the following: 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' This is quite nice and I want to analyze my code for any call that I may have forgotten, but I can't find Lint option that I have to select in my Inspection profile. How is the inspection

Requesting Android M permissions from Activity with noHistory=“true” and/or showOnLockScreen=“true”

Deadly 提交于 2019-12-03 15:10:56
I'm working on a video calling app and I have an 'incoming call' screen which alerts the user when someone is calling them. This screen is an Activity triggered by an incoming GCM and has noHistory="true" and showOnLockScreen="true" set in the manifest so that the user can engage in calls without having to unlock their device. If the user chooses to accept the call, I launch another activity to engage in the actual call. However, before I launch the second activity I check that the necessary permissions (camera, mic etc) are present and request them if not. This is where the problems arise.

crash before app starts : SecurityException: Permission Denial: INTERACT_ACROSS_USERS_FULL

末鹿安然 提交于 2019-12-03 14:46:57
问题 Background I have a rooted device, which is Galaxy S3 I9300 , with Samsung stock based ROM, based on Android 4.3. I never had any problems running an app i'm working on with this device. The problem ever since yesterday (and I didn't change anything on the device), each time I open the app, it shows for a very short time, closes itself without any crash dialog yet it shows the next log: 01-30 09:27:18.325: E/DatabaseUtils(2366): Writing exception to parcel 01-30 09:27:18.325: E/DatabaseUtils

How can I check permission under API level 23? [duplicate]

℡╲_俬逩灬. 提交于 2019-12-03 13:35:40
This question already has answers here : Is it available to set checkSelfPermission on minimum SDK < 23? (5 answers) One of my app has a permission RECORD_AUDIO and my app's targetSdkVersion is 22. I cannot check permission at runtime. But I notice if I install my app in Android 6.0 and above. Users can manually deny permission in System App permissions Settings. So my question is how can I check whether my app is grand Audio permission under API level 23? I have searched for quite a long time but only find some document about how to check permission in Android M. I have noticed context has a

Android - Workaround the ACCESS_CONTENT_PROVIDERS_EXTERNALLY permission?

为君一笑 提交于 2019-12-03 13:24:17
I'm building an application which gives this exception because i call some internal methods Permission Denial: Do not have permission in call getContentProviderExternal() from pid=2520, uid=10047 requires android.permission.ACCESS_CONTENT_PROVIDERS_EXTERNALLY java.lang.SecurityException: Permission Denial: Do not have permission in call getContentProviderExternal() from pid=2520, uid=10047 requires android.permission.ACCESS_CONTENT_PROVIDERS_EXTERNALLY I did some search and i knew that android OS gives this permission only for the shell users, I wonder if there exists any workaround this .. Is

Since Android 6.0 listening to the PhoneStateListener.LISTEN_DATA_CONNECTION_STATE changes seems to no longer require READ_PHONE_STATE permission

▼魔方 西西 提交于 2019-12-03 12:50:55
I'm applying Android 6.0 runtime permissions into an app which listens to carrier data connection state changes. I first tried to just remove the READ_PHONE_STATE from the manifest to check where the app requires the permission. To my surprise the app didn't crash at all. After this I've tried the same installation on two pre 6.0 devices which did actually crash on it. To me it seems like Android 6.0 does no longer require the permission. Is there any way to confirm this? The line below is the one on which the pre 6.0 devices crashes: tm(TelephonyManager).listen(this, PhoneStateListener.LISTEN