android-permissions

Music Player asking for Write External Storage Permission?

风流意气都作罢 提交于 2019-12-05 10:52:08
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.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:190) at android.database.DatabaseUtils

Request permission on Android M only when targeting lower API

≯℡__Kan透↙ 提交于 2019-12-05 07:46:57
So in my app i would like to add an option to selectively add a permission (say, direct dial) when the user is on Android M but, at the same time, i would like to have that permission NOT showing as required in API 22 or lower simply because its not essential so i prefer not asking for it during install (so de facto making that feature available on M only). So, i understand the new model of M is that it will allow optional permissions when user is on M and it will make those permissions mandatory when on lower APIs. So is there any known way to just remove those permissions on API lower than

Android launch app show “Can modify system settings” dialog

最后都变了- 提交于 2019-12-05 05:06:16
I write a simple demo , test a third-party push SDK. When I launch my demo , system shows me a dialog like this. But the dialog doesn't show up below Android 6.0 How to avoid it when I launch my app except allowing the permission request? As per marshmallow and onwards,the app is not allowed the permissions at the time of installation. Rather, the system will ask for required permission at the time in need(only one time if granted).In older versions(<23), apps were granted all required permissions at the time of installation. Can modify system settings: This is another new access setting. This

Google Play -505 install error

ぐ巨炮叔叔 提交于 2019-12-05 04:32:46
I have an app in Google Play, which was built with tools and API 22. Everything was working well, but last update with API 23 (tools 23.1) shows users with Android 6.0 error numbered "-505" (in Google Play app or in notification). BUT.. its really random... I know about two same devices - Nexus 5 with 6.0.1 - one have -505, second is installing update without problem.... After a lot of searching I've found information that this error means duplicated permission, but which...? <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS

cordova - remove unnecessary permissions

◇◆丶佛笑我妖孽 提交于 2019-12-05 03:54:33
I need to play sounds in my game, so I added org.apache.cordova.media plugin to my application. Now platforms/android/AndroidManifest.xml contains 2 entries I don't need: <uses-permission android:name="android.permission.RECORD_AUDIO" /> <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /> If I remove those lines, this file regenerated and permissions are added again. What is correct way to remove these permissions? I use apache cordova 3.5.0 You have to open plugins/android.json , locate in that file part which looks like "AndroidManifest.xml": { "parents": { "/*": [ ..

BroadcastReceiver permission for adb shell

房东的猫 提交于 2019-12-04 23:12:37
Consider a simple tool using a BroadcastReceiver to achieve a simple goal. Because this should not be used by other applications, it defines a permission with a protectionLevel of signature or signatureOrSystem : <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="any.test"> <permission android:name="any.test.PERMISSION" android:protectionLevel="signatureOrSystem" /> <application android:label="AnyTest"> <receiver android:name=".Receiver" android:exported="true" android:permission="any.test.PERMISSION" /> </application> </manifest> Now I'd like to test this by sending

Requesting Android M permissions from Activity with noHistory=“true” and/or showOnLockScreen=“true”

坚强是说给别人听的谎言 提交于 2019-12-04 22:43:32
问题 I'm working on a video calling app and I have an 'incoming call' screen which alerts the user when someone is calling them. This screen is an Activity triggered by an incoming GCM and has noHistory="true" and showOnLockScreen="true" set in the manifest so that the user can engage in calls without having to unlock their device. If the user chooses to accept the call, I launch another activity to engage in the actual call. However, before I launch the second activity I check that the necessary

Few questions about custom permissions in Android

人走茶凉 提交于 2019-12-04 22:35:16
I am learning Android programming and I have kind of understood the concept of custom permission. Based on my understanding this is how custom permissions works: 'Base app' can protect some of its components (e.g., activity and services) by declaring custom permissions (i.e., using <permission> tags in the manifest file) and the 'client app' that calls the activities and services protected by custom permissions need to acquire necessary permissions (i.e., using <uses-permission> tags in the manifest file) to call those components in the base app . However, I have these questions regarding

Android sdk23 find places to update and request permission

巧了我就是萌 提交于 2019-12-04 22:08:21
May be I am missing something, but is there a way to quickly know all the places I have to update with the new permission checks needed for Android apps using sdk23? As a developer this change is very frustrating considering the multiple places that need to be updated. I would like to make sure I don't forget/miss any of them. I am talking about finding where it will be needed to use these two functions before using the permissions qualified as 'Dangerous' ContextCompat.checkSelfPermission() ActivityCompat.requestPermissions() https://developer.android.com/training/permissions/requesting.html

Android - Workaround the ACCESS_CONTENT_PROVIDERS_EXTERNALLY permission?

你。 提交于 2019-12-04 21:27:17
问题 I'm building an application which gives this exception because i call some internal methods Permission Denial: Do not have permission in call getContentProviderExternal() from pid=2520, uid=10047 requires android.permission.ACCESS_CONTENT_PROVIDERS_EXTERNALLY java.lang.SecurityException: Permission Denial: Do not have permission in call getContentProviderExternal() from pid=2520, uid=10047 requires android.permission.ACCESS_CONTENT_PROVIDERS_EXTERNALLY I did some search and i knew that