android-permissions

Why does my app say I am requesting permission for Contacts?

房东的猫 提交于 2019-12-19 20:36:12
问题 I have a watch face app that says I am requesting permissions for Contacts... but I'm not. I can't figure out why this is... I have in-app billing and I access Google fit data... as well as Google Analytics. Here is a list of the permissions in my manifest: <!-- Normal Permissions --> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"

“Write settings” permission not granted marshmallow android

狂风中的少年 提交于 2019-12-19 19:53:46
问题 <uses-permission android:name="android.permission.WRITE_SETTINGS" I have declared above line in my manifest ,and i ask for permission on activity start but unlike other permissions,after restarting my app,it again asks for permission.When i check if permission has been granted or not,i get result that says not granted for only this permission but when i checked the same thing with other permissions ,they are granted after the user has done so. ActivityCompat.requestPermissions(SplashScreen

Detecting wether a permission can be requested or is permanently denied

廉价感情. 提交于 2019-12-19 19:43:12
问题 Situation One of my fragments accesses the camera. So of course i need to check the permission in my activity first, before i redirect to it. If the user denies the permission the Activity finishes and redirects him to the previous Activity he was in. Additionally i would like to show a different fragment when the Activity starts and detects that the permission was permanently denied. (The little checkbox "Never ask again" on the android permission dialog) Problem I could not find a proper

Android 6.0 needs restart after granting user permission at runtime

本秂侑毒 提交于 2019-12-19 12:49:17
问题 I follow this guide to ask for permissions for Android 6.0, https://developer.android.com/preview/features/runtime-permissions.html#support-lib However, I have to destroy my application and re-launch to actually have the WRITE_EXTERNAL_STORAGE permission, otherwise it keeps failing for file creation. Am I missing something? if(ActivityCompat.checkSelfPermission(mContext, Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_DENIED){ ActivityCompat.requestPermissions(

Permission Denial: MediaDocumentsProvider

荒凉一梦 提交于 2019-12-19 11:25:32
问题 I am getting the following exception when trying to display a URI. I think it occurs after my activity is stopped and I try to access a viable URI again. There are other questions addressing this problem but I am very confused as to how to apply any solutions to my code since my takePhotoIntent allows for a picture to either be taken or chosen from gallery (found below). Unable to open content: content://com.android.providers.media.documents/document/image%3A49688 java.lang.SecurityException:

Request permission on PACKAGE_USAGE_STATS

与世无争的帅哥 提交于 2019-12-19 09:19:10
问题 I want to check wheter the user have granted permission for my application to use PACKAGE_USAGE_STATS . What I am currently doing is this: // Control that the required permissions is instantiated! if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ContextCompat.checkSelfPermission(this, Manifest.permission.PACKAGE_USAGE_STATS) != PackageManager.PERMISSION_GRANTED) { ActivityCompat.requestPermissions(this, new String[]

Building an Android APK with same certificate as the system

若如初见. 提交于 2019-12-19 04:59:14
问题 I'm trying to make a system app work. Here's what I have: An OEM OMAP platform with full 4.4.2 source code. I've built the system and loaded on my platform using Ubuntu 14.04. That all works. Now, there is an app from the OEM which directly accesses the hardware (DSP, I2C, UART) etc. The original APK that came from the OEM works on my platform. I built the exact same app using make command (not using Eclipse); It builds and I can install on the platform. But when I try to launch the app, it

Request permissions based on API level

…衆ロ難τιáo~ 提交于 2019-12-19 04:05:59
问题 Beginning in Android 6.0 (API level 23), we can ask permissions at run time. However, according to the docs, all permissions still need to be defined in AndroidManifest.xml so in APIs lower than 23, these permissions will be granted prior to installing the app. I want to request ACCESS_FINE_LOCATION permission only at runtime - since this is a sensitive permission, requesting it prior to installation without any context will cause a decrease in downloads. I am targeting my app to API levels

Intent call action doesn't works on Marshmallow

雨燕双飞 提交于 2019-12-18 21:29:47
问题 I'm trying to start a call intent action on a device who has Marshmallow as OS, Using the same steps as usual (This is working on versions bellow): Add permission: <uses-permission android:name="android.permission.CALL_PHONE" /> Open the intent: Intent intent = new Intent(Intent.ACTION_CALL); intent.setData(Uri.parse("tel:" + getString(R.string.connect_phone))); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent); This is the log I'm getting: FATAL EXCEPTION: main Process:

External Storage Permission Issue with MediaProvider / Ring Tones

核能气质少年 提交于 2019-12-18 17:16:22
问题 Some of my users have reported to Google Play the following error when trying to select a ringtone in my app. (there's more to it, but it's not relevant) java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaProvider uri content://media/external/audio/media from pid=5738, uid=10122 requires android.permission.READ_EXTERNAL_STORAGE I assume this issue is happening due to certain tones that are on external storage. I don't want to include the READ_EXTERNAL