android-permissions

Android permission doesn't work even if I have declared it

风格不统一 提交于 2019-12-11 18:26:06
问题 I'm trying to write code to send an SMS from an Android app, but when I try to send the SMS it sends me back the error: 09-17 18:37:29.974 12847-12847/**.**.****E/AndroidRuntime﹕ FATAL EXCEPTION: main Process: **.**.****, PID: 12847 java.lang.SecurityException: Sending SMS message: uid 10092 does not have android.permission.SEND_SMS. at android.os.Parcel.readException(Parcel.java:1599) at android.os.Parcel.readException(Parcel.java:1552) at com.android.internal.telephony.ISms$Stub$Proxy

android app crashes after permission disabling on API 23

邮差的信 提交于 2019-12-11 17:21:36
问题 My app uses permissions in app i'm asking runtime permission and it works fine BUT when doing this steps 1) using device home button going to current app settings page 2) switching off permission 3)then going back to app again with home button it crashes without any exception for exmaple INSTAGRAM app 1) open instagram 2) goto settings page 3) switch permission 4)return to app it restarts, i want to do something like that 回答1: To use CAMERA you have to check the permission at runtime. All the

Android permission doesn't work even if I have declared it

不打扰是莪最后的温柔 提交于 2019-12-11 16:26:15
问题 I'm trying to write code to send an SMS from an Android app, but when I try to send the SMS it sends me back the error: 09-17 18:37:29.974 12847-12847/**.**.****E/AndroidRuntime﹕ FATAL EXCEPTION: main Process: **.**.****, PID: 12847 java.lang.SecurityException: Sending SMS message: uid 10092 does not have android.permission.SEND_SMS. at android.os.Parcel.readException(Parcel.java:1599) at android.os.Parcel.readException(Parcel.java:1552) at com.android.internal.telephony.ISms$Stub$Proxy

Android webview error when asking for geolocation

杀马特。学长 韩版系。学妹 提交于 2019-12-11 16:22:55
问题 I'm getting the user geolocation with getCurrentPosition and it's working fine in Google Chrome, But in Android Webview i get this error: E/cr_LocationProvider: Caught security exception while registering for location updates from the system. The application does not have sufficient geolocation permissions. E/cr_LocationProvider: newErrorAvailable application does not have sufficient geolocation permissions. This is my Manifast: <?xml version="1.0" encoding="utf-8"?><manifest xmlns:android=

Manifest.permission.READ_PROFILE not found

[亡魂溺海] 提交于 2019-12-11 15:57:18
问题 While working on an Android application I am required to grant permission for reading/writing for contacts and profile. I found Android manifest file have possible permissions like, <uses-permission android:name="android.permission.READ_CONTACTS"/> <uses-permission android:name="android.permission.WRITE_CONTACTS"/> <uses-permission android:name="android.permission.READ_PROFILE"/> <uses-permission android:name="android.permission.WRITE_PROFILE"/> And I am able to show request runtime

Why some apps don't need auto-run permission to run services in background in Xiaomi devices?

ぃ、小莉子 提交于 2019-12-11 14:48:08
问题 I recently came to know that unless you specifically ask the user to add your app in the "apps that can auto-run in the background" section, you cant make services which can run in the background in Xiaomi devices and other similar devices. But I have see some apps like this one which are added in the device's "apps that can auto-run in the background" section automatically as soon they get downloaded without even asking for permission. How is that possible? 回答1: The manufacturer (or mobile

No Permissions Pop Up Anymore?

房东的猫 提交于 2019-12-11 13:58:34
问题 So I am creating an app that requests permission to a users google account. I used mine to test and so I gave it permission and then removed it to see if it would ask for it again. It was still using the token it got so I deleted the app from my phone and reinstalled it. I didn't change any code and now all of a sudden it only shows the account page (to select which account) and then once I press ok, nothing shows to give it permission. In my run console I get the following: $ adb push C:

Failure delivering result - Cannot execute non-void method openCamera

会有一股神秘感。 提交于 2019-12-11 12:16:35
问题 I'm using EasyPermissions library from Google to handle Permissions on Android 6. The first time I click the button to capture image it asks me to give permissions for CAMERA and for WRITE_EXTERNAL_STORAGE . After I have accepted both permissions app crashes with the error message you can see below : E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.debug, PID: 22768 java.lang.RuntimeException: Failure delivering result ResultInfo{who=@android:requestPermissions:, request=123,

File not found exception when reading external storage

时光怂恿深爱的人放手 提交于 2019-12-11 12:06:29
问题 Earlier the code was working totally fine, and even now it works fine for pre Android 6 devices, but in my Nexus 5, 6.0.1, I am unable to access data from external storage. It shows File not Found Exception java.io.FileNotFoundException: /storage/emulated/0/Download/********/*****: open failed: ENOENT (No such file or directory) For writing the data to storage, I am asking for runtime storage permission and that part seems to be fine. 回答1: Since your code is working fine in Pre-Marshmallow

Sharing files or content with 3rd party activities

寵の児 提交于 2019-12-11 11:52:46
问题 I have a simple question but can't seem to find the answer anywhere I look online. I have an activity A that downloads files from the internet and puts them to a local folder obtained by getApplicationContext().getFilesDir().getPath() which points to: "/data/data/com.myapp.android/files" Now when the user selects a file I want to show its content and for that I do the following: File file = new File(filePath); Uri uri = Uri.fromFile(file); MimeTypeMap mime = MimeTypeMap.getSingleton(); String