android-permissions

How does storage access change on Android 6?

二次信任 提交于 2019-12-17 22:05:15
问题 Background Android had a lot of changes as to how to handle the SD-card and storage in general: API 3 - you get all access, no permission needed API 4-15 - you need to use WRITE_EXTERNAL_STORAGE, and you get all access. API 16-18 - if you wish only to read, use READ_EXTERNAL_STORAGE API 19-20 - you can't read or write to secondary external storage (SD-card), unless your app is a system app, or you have root. API 21-22 - in order to access the SD-card, you need to ask the user for permission,

How to grant runtime permissions to an android application without prompting the user

社会主义新天地 提交于 2019-12-17 21:34:24
问题 I am trying to build an android application which when installed through Google Playstore should have access to the runtime permissions like SMS Access, Contacts, Location Service without asking the user for it. I know it is possible since I have seen it happen in a couple of Android Applications on Playstore like Kotak 811 App Standard Chartered Banking App Does anyone know how this can be achieved even when the phone is running Android Nougat. 回答1: How to grant runtime permissions to an

How do I get information about a phone's IMEI in Android 10?

余生长醉 提交于 2019-12-17 20:32:40
问题 Before Android 10, I was using the TelephonyManager API to retrieve that info, but it's no longer working in Android 10. 回答1: From the Android Developers Documentation Website Starting in Android 10, apps must have the READ_PRIVILEGED_PHONE_STATE privileged permission in order to access the device's non-resettable identifiers, which include both IMEI and serial number. Third-party apps installed from the Google Play Store cannot declare privileged permissions. If your app doesn't have the

Require permission only for older android versions: maxSdkVersion does not work?

偶尔善良 提交于 2019-12-17 19:22:19
问题 I want to some permissions only for older devices for compatibility. So I did some research and found this here: android:maxSdkVersion The highest API level at which this permission should be granted to your app. Setting this attribute is useful if the permission your app requires is no longer needed beginning at a certain API level. For example, beginning with Android 4.4 (API level 19), it's no longer necessary for your app to request the WRITE_EXTERNAL_STORAGE permission when your app

App not available for Nexus 7 on Google Play

十年热恋 提交于 2019-12-17 18:54:28
问题 I am aware of the camera availability on Nexus 7 so I changed my manifest making the permission not required as follow: <uses-permission android:name="android.permission.CAMERA" android:required="false"/> The app is still not available. At this point I am confused from the doc which talks about uses-feature rather than user-permission : Be aware of which system features that you declare (or imply) are required to run your application or the Play Store will not make your application available

Android: write failed: EPIPE (Broken pipe) Error on write file

馋奶兔 提交于 2019-12-17 18:51:38
问题 I was trying to take screenshot of the Android screen programatically. I had done the following code: private void getsnap(){ try{ Process sh = Runtime.getRuntime().exec("su", null, null); OutputStream os = sh.getOutputStream(); String filePath = this.getFilesDir().getPath().toString() + "/fileName1.jpeg"; os.write(("/system/bin/screencap -p " + filePath).getBytes("ASCII")); os.flush(); os.close(); sh.waitFor(); } catch (Exception e) { e.printStackTrace(); } } java.io.IOException: write

signature protection level - clarifying [duplicate]

允我心安 提交于 2019-12-17 18:49:19
问题 This question already has answers here : Regarding Android Permissions and Signature Protection level (2 answers) Closed 5 years ago . As I am new to Android, I wanted to ask something which is not clear enough to me. I read the API guide about the permissions as a lot more Q&A considering this topic, still, I am not sure if I understand it correctly. So, signature protection level is: A permission that the system grants only if the requesting application is signed with the same certificate

Provide custom text for Android M permission dialog

感情迁移 提交于 2019-12-17 16:15:43
问题 Is it possible to provide a custom text for the system dialog which is displayed when the user is asked to grant permission? 回答1: No, you can't customize the text of the dialog, but you can provide an explanation before request the permission. Quoting from developer.android.com: Request Permissions If your app needs a dangerous permission that was listed in the app manifest, it must ask the user to grant the permission. Android provides several methods you can use to request a permission.

Provide custom text for Android M permission dialog

南楼画角 提交于 2019-12-17 16:13:13
问题 Is it possible to provide a custom text for the system dialog which is displayed when the user is asked to grant permission? 回答1: No, you can't customize the text of the dialog, but you can provide an explanation before request the permission. Quoting from developer.android.com: Request Permissions If your app needs a dangerous permission that was listed in the app manifest, it must ask the user to grant the permission. Android provides several methods you can use to request a permission.

How can I customize permission dialog in Android?

荒凉一梦 提交于 2019-12-17 16:01:47
问题 Suppose I request a permission at runtime like the following: ActivityCompat.requestPermissions(thisActivity, new String[]{Manifest.permission.READ_CONTACTS}, MY_PERMISSIONS_REQUEST_READ_CONTACTS); Android system creates a popup dialog to request permission. How can I define a custom layout for that dialog? 回答1: The short answer is, you can't . As android documentation puts: When your app calls requestPermissions(), the system shows a standard dialog box to the user. Your app cannot configure