android-permissions

Can't write file on SD-card

梦想与她 提交于 2019-12-01 12:15:29
I'm trying to write a photo on the SD card without success. I've got the permissions to write in the removable storage and the sd card is mounted. Also, I checked that the path to the SD card exists and I have obtained a positive result. Where it fails is when I use the mkdir() function. It returns false and no file is created. I have tested on both a Samsung A6(Marshmallow) and a Samsung Tab4(Lollipop) This is the snippet of code I'm using to retrieve the path to the SD-card. Because the standard procedure didn't work with Samsung devices, I'm using this snippet of code that I took from a

Android API 23 Requesting Multiple Permissions

你说的曾经没有我的故事 提交于 2019-12-01 11:21:50
问题 I am trying to request permissions on my Launcher Activity. For API < 23, it works perfect. However, when I test the app on a device running API 23, it says: "PostPaid Balance has stopped." I hit the "close App button," the app closes and immediately asks for one permission. I hit accept. Then I tap on the app icon to reopen and the same thing happens, except that now it asks for the next permission. Then I tap on the app icon and this time executes correctly. It seems like it is asking for

Can't write file on SD-card

时光总嘲笑我的痴心妄想 提交于 2019-12-01 11:10:04
问题 I'm trying to write a photo on the SD card without success. I've got the permissions to write in the removable storage and the sd card is mounted. Also, I checked that the path to the SD card exists and I have obtained a positive result. Where it fails is when I use the mkdir() function. It returns false and no file is created. I have tested on both a Samsung A6(Marshmallow) and a Samsung Tab4(Lollipop) This is the snippet of code I'm using to retrieve the path to the SD-card. Because the

Android runtime permissions on android versions below M?

早过忘川 提交于 2019-12-01 09:25:28
Recently my ola cabs application , after the latest update, asked for location permission at runtime. It did not open the location settings screen but just by clicking on yes, my location (GPS) of the device was turned on and the application proceeded without going to location settings or any settings screen. This feature was about to come in android M and is available on the MNC preview only, so I am guessing it cannot be used in devices at this point of time. So how is this application implementing this feature? It is using SettingsApi in the Play Services SDK 7.0+, to display the location

Permission Denial: requires android.permission.READ_EXTERNAL_STORAGE, or grantUriPermission() (API 23)

安稳与你 提交于 2019-12-01 08:51:37
I am trying to request user permissions at runtime. The API is 23 and I want to pick up an image from the phone's gallery. Following some snippets, this is the code I have so far: In the onCreate() of the Activity I check: if (ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) { imageUploader5.setEnabled(true); ActivityCompat.requestPermissions(this, new String[] { Manifest.permission.CAMERA, Manifest.permission.WRITE_EXTERNAL_STORAGE }, 0); } Then I override: @Override public void onRequestPermissionsResult(int requestCode, String[]

Not able to add new group permission in android

坚强是说给别人听的谎言 提交于 2019-12-01 08:37:29
问题 I'm trying to add a new group permission in Android but it is not taking effect in my application (new CTS test). Below are the changes : test@test-ubuntu:~/android_aosp/system/core$ git diff diff --git a/include/private/android_filesystem_config.h b/include/private/android_filesystem_config.h index d2193b7..7725126 100644 --- a/include/private/android_filesystem_config.h +++ b/include/private/android_filesystem_config.h @@ -77,6 +77,7 @@ #define AID_SDCARD_ALL 1035 /* access all users

can't upload apk: READ_EXTERNAL_STORAGE with different maxSdkVersions

◇◆丶佛笑我妖孽 提交于 2019-12-01 08:33:58
This is the first time I ask a question here. Anyway, as the title says, I'm trying to put my application on the market. When I try to upload the signed apk, I get the error: Upload failed Duplicate declarations of permission android.permission.READ_EXTERNAL_STORAGE with different maxSdkVersions. I tried searching through the existent questions, but I can't find a solution. ... <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 runtime permissions on android versions below M?

只谈情不闲聊 提交于 2019-12-01 06:57:21
问题 Recently my ola cabs application, after the latest update, asked for location permission at runtime. It did not open the location settings screen but just by clicking on yes, my location (GPS) of the device was turned on and the application proceeded without going to location settings or any settings screen. This feature was about to come in android M and is available on the MNC preview only, so I am guessing it cannot be used in devices at this point of time. So how is this application

Permission Denial: requires android.permission.READ_EXTERNAL_STORAGE, or grantUriPermission() (API 23)

可紊 提交于 2019-12-01 06:40:45
问题 I am trying to request user permissions at runtime. The API is 23 and I want to pick up an image from the phone's gallery. Following some snippets, this is the code I have so far: In the onCreate() of the Activity I check: if (ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) { imageUploader5.setEnabled(true); ActivityCompat.requestPermissions(this, new String[] { Manifest.permission.CAMERA, Manifest.permission.WRITE_EXTERNAL_STORAGE },

java.lang.SecurityException: Permission Denial: opening provider

左心房为你撑大大i 提交于 2019-12-01 06:35:31
I start image picker intent using: final Intent pickIntent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI); pickIntent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true); startActivityForResult(intent, PICK_IMAGE); and in onActivityResult() I get uris of all picked images and start Jobs which run in background and upload those images ( https://github.com/yigit/android-priority-jobqueue ). But if I press back button and exit out of activity then any job that was not started, can't access picked image when it runs and throws an exception: java.lang.SecurityException: