android-permissions

Can an app get a permission to a whole sub tree from SAF?

[亡魂溺海] 提交于 2019-12-07 21:37:25
问题 Can a third party app request a Storage provider through Storage Access Framework to grant it with premissions to delete files within\copy files to a directory or in any subtree underneath the tree Uri recieved onActivityResult by a call to startActivityForResult(new Intent(Intent.ACTION_OPEN_DOCUMENT_TREE),14) ? If it can, how do you claim it on the third party app code? I tried getContentResolver().takePersistableUriPermission(treeUri, Intent.FLAG_GRANT_WRITE_URI_PERMISSION); but when i try

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

What permissions do I need to download files?

我怕爱的太早我们不能终老 提交于 2019-12-07 11:36:25
问题 I am trying to download a file using the DownloadManager class. public void downloadFile(View view) { String urlString = "your_url_here"; try { // Get file name from the url String fileName = urlString.substring(urlString.lastIndexOf("/") + 1); // Create Download Request object DownloadManager.Request request = new DownloadManager.Request(Uri.parse((urlString))); // Display download progress and status message in notification bar request.setNotificationVisibility(Request.VISIBILITY_VISIBLE

Firebase additional permissions. Is user asked for acceptance

二次信任 提交于 2019-12-07 10:41:04
问题 I'm currently working on integrating Firebase Analytics into my android app. The problem that I'm encountering is that Firebase adds some new permissions. These permissions are permission.WAKE_LOCK com.google.android.c2dm.permission.RECEIVE My question is: What happens when the user wants to (automatically) update my app in pre Marshmallow versions? Is he asked for permission or not, because it is a normal permission? In post Marshmallow the documentation is quite clear. It simply doesn't ask

Permission for reading/writing to the root folder in Android

纵然是瞬间 提交于 2019-12-07 10:25:12
问题 Are there any permissions I can/must declare in my app, if I want the app to be able to scan the whole "/" folder (say to search for all .txt files e.g. recursively)? I am getting just null so far (when calling File.listFiles ) no matter what permissions I try. I guess I am missing something. 回答1: Unless you root your device, it is impossible to do any operations on the root directory on a non-rooted device because a third party app will run as a normal user and won't have the root

Android app Only For Phones

有些话、适合烂在心里 提交于 2019-12-07 07:32:24
问题 Is it possible to create Android app which can be downloaded from google play only by phone not tablet? 回答1: The answer for this always brings up the question of what you define as a "tablet". Do you include things like the Galaxy Note? It's still technically a phone but it's kind of on the borderline. My question would be what conditions make you want to restrict it? If you simply want to require that it be able to make calls, you can add a feature tag to your manifest: <uses-feature android

avc: denied { read } for name=“/” dev=“rootfs” ino=1 scontext=u:r:untrusted_app

有些话、适合烂在心里 提交于 2019-12-07 07:28:45
问题 I was not able to find here solution to read/write problem on Android File manager application I am trying to create. When running on real device, I am not able to delete a file from SD card. Could anyone guide me, what am I doing wrong and how to fix the permissions? I have added read/write permissions to AndroidManifest.xml <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> but anyway, I am getting this error message: avc: denied { read } for name="/" dev="rootfs"

How to add Multiple permissions in the permissions Request [duplicate]

你。 提交于 2019-12-07 07:18:27
This question already has answers here : Android 6.0 multiple permissions (22 answers) Closed last year . I would like to know how to add multiple permissions on a single request. This is regarding the Marshmallow version of android. You need to create an arraylist of permission required List<String> permissionsNeeded = new ArrayList<String>(); final List<String> permissionsList = new ArrayList<String>(); if (!addPermission(permissionsList, Manifest.permission.READ_PHONE_STATE)) permissionsNeeded.add("android.permission.READ_PHONE_STATE"); if (!addPermission(permissionsList, Manifest

Instant Apps Camera Intent

百般思念 提交于 2019-12-07 06:41:29
问题 I developed and Instant App which one I would like to take a picture with the camera. Everything work if I launch the Installed App . But with Instant App , I get the following error : java.lang.SecurityException: Not allowed to start activity Intent { act=android.media.action.IMAGE_CAPTURE launchParam=MultiScreenLaunchParams { mDisplayId=0 mFlags=0 } Here my code : AndroidManifest.xml <uses-permission android:name="android.permission.CAMERA" /> Activity : private static int CAMERA_REQUEST =

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