android-permissions

Android issues reading images from persistent Uri

风格不统一 提交于 2019-12-04 21:11:17
My app lets the user select images and then it animates the images. It's a simple thing and I want it to run on 4.2 and onwards. It works perfectly now. The app is supposed to remember the chosen images and let these be default the next time the user runs the app - when the app is restarted. This works beautifully on my Galaxy Nexus (4.2.1) but not so well on my Galaxy S8+ (7.0). Since I love how it works on 4.2.1, it's a bit frustrating that it can't simply run the same on later platforms. This is inside onCreate() : ((ImageButton) findViewById(R.id.imagex)) .setOnClickListener(new View

Android 6.0 Write to external SD Card

五迷三道 提交于 2019-12-04 19:16:57
I tried everything to write on external SD card on Android 6.0, but I am not able to write on it. I did research on stackoverflow and found lot of things but none works. Here is my code String extPath = System.getenv("SECONDARY_STORAGE") + "/Android/data/com.gvm.externalstorage.externalstoragetest/"; File file = new File(extPath,"myFiles"); if (!file.exists()) { boolean dirResult = file.mkdirs(); Log.e("Directory Exist", dirResult + " Directory created"); } else { Log.e("Directory Exist", "Exist"); Log.e("Direcotry Path",file.getAbsolutePath()); } //String displayname = fileName.replace("%20",

Development tools permission I did not set

烂漫一生 提交于 2019-12-04 18:33:33
问题 I've been creating an android app and when I export (and sign) it, it always adds a "Development tools (test access to protected storage" permission that I had never set. This is my manifest: <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.tdr" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="15" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <application

Check permissions READ_CONTACTS in MIUI

梦想与她 提交于 2019-12-04 18:29:25
I try to check permissions in my Manifest I set <uses-permission android:name="android.permission.READ_CONTACTS" /> Then in fragment I try to check int permissionCheck = ContextCompat.checkSelfPermission(getActivity(), Manifest.permission.READ_CONTACTS); But I get only 0 despite of any state of permission in application properties in OS. I checked in Android 4.4.4 MIUI 6.5.1 May be the reason in MIUI I have got -1 if I try check permission which there isn't in Manifest, but I wanna know the switch state of the permission. Thanx Add this function to your code and call checkUsagePermission() for

Android JobScheduler - can't create a persistent job

﹥>﹥吖頭↗ 提交于 2019-12-04 17:09:56
问题 I am trying out the new JoScheduler API that has come with Android Lollipop. I have so far managed to successfully create and have a job run with a delay of 6000 milliseconds with no network requirements without an issue. However, I have just tried to persist the same job via using the setPersisted(true) function. As soon as the job build() function is called it now fails saying that I need the RECEIVED_BOOT_COMPLETED permission in the Manifest file. But I have added the permission: <?xml

How Can the Settings App Start an App's Non-Exported Activity?

别等时光非礼了梦想. 提交于 2019-12-04 17:07:35
问题 Android N lets you link an activity of yours into your app's page in Settings. Just add an <intent-filter> for android.intent.action.APPLICATION_PREFERENCES . Android N's Settings app will look for the activity in your app that has that <intent-filter> . If Settings finds one, it will add a gear icon to your app's page in Settings, and if the user taps the gear, they will be taken to your designated activity. I was worried about security, and so I filed an issue, looking for a permission we

Marshmallow FINE and COARSE location permission

佐手、 提交于 2019-12-04 16:11:05
问题 I'm trying to access ACCESS_FINE_LOCATION and if it cannot be found access ACCESS_COARSE_LOCATION . So I request for those 2 permission, but they give me the same dialog asking for location permission. I know those are both in the same group but Google says: Note: Your app still needs to explicitly request every permission it needs, even if the user has already granted another permission in the same group. In addition, the grouping of permissions into groups may change in future Android

Cordova camera plugin permission denial in android 6.0

五迷三道 提交于 2019-12-04 16:07:23
I am using ionic to develop a mobile application. The application requires camera. I added Cordova camera plugin to my project. Also I am using ngCordova wrapper. The application was working fine. Last day I used one device with android version 6.0 (Marshmallow) to test my app. when I click on the button it directly triggers the error. I done USB debugging, I got the error that Camera Error "Permission Denial: starting Intent { act=android.media.action.IMAGE_CAPTURE flg=0x3 cmp=com.google.android.GoogleCamera/com.android.camera.CaptureActivity clip={text/uri-list U:file:///storage/emulated/0

Some Permissions' protectionLevel seems wrongly documented or implemented

风流意气都作罢 提交于 2019-12-04 15:49:03
I'm running through many permissions tagged PROTECTION_NORMAL and PROTECTION_DANGEROUS in a ListView . Upon click my application calls ActivityCompat.requestPermission() . All permissions I tested (by that I mean all normal and dangerous permissions for API-7 and above I could find ) are working fine on my Emulator, except for some: CHANGE_NETWORK_STATE Requesting CHANGE_NETWORK_STATE always returns PackageManager.PERMISSION_DENIED (without even prompting). I would expect it granted by default since it's flagged normal , or if the documentation is wrong, to be prompted for it then. GET

Ask for runtime permission only for Android Marshmallow?

孤者浪人 提交于 2019-12-04 15:01:47
I want to add run time permission only for marshmallow because it crashes my application in Android marshmallow devices otherwise its working properly. Is it possible to add multiple permissions at a single time? I have written code for camera permission, but I have written code for single permission and that is working fine. private void requestpermissioncamera() { final List<String> permissionsList = new ArrayList<String>(); if (!addPermission(permissionsList, Manifest.permission.ACCESS_FINE_CAMERA)) permissionsNeeded.add("Camera"); requestPermissions(permissionsList.toArray(new String