android-permissions

Marshmallow Fingerprint Scanner Hardware Presence

◇◆丶佛笑我妖孽 提交于 2019-11-30 21:31:18
I am looking to get started with the Marshmallow Fingerprint Authentication API. I understand that to ask for permission, I must use the following method: ContextCompat.checkSelfPermission(getContext(), Manifest.permission.USE_FINGERPRINT); And I must check if the device is running API level 23 or higher. But before I ask for permission, I would like to check if the device actually has a fingerprint scanner to begin with. I found the following two methods to do this check: FingerprintManager manager = (FingerprintManager) getSystemService(Context.FINGERPRINT_SERVICE); manager

ActivityCompat.requestPermissions does not show prompt

落爺英雄遲暮 提交于 2019-11-30 21:14:29
I'm attempting to request ACCESS_FINE_LOCATION permissions in order to get the user's current location. My logging indicates that my app does not currently have this permission when querying ContextCompat.checkSelfPermission() , but when calling ActivityCompat.requestPermissions() nothing is displayed. My Google map code (implementing OnMapReadyCallback and ActivityCompat.OnRequestPermissionsResultCallback() ) is in a FragmentActivity . I have managed to get the requestPermissions() function working successfully in other Activities in the app, it's just the one with the Google map. It doesn't

Intent call action doesn't works on Marshmallow

你说的曾经没有我的故事 提交于 2019-11-30 18:34:40
I'm trying to start a call intent action on a device who has Marshmallow as OS, Using the same steps as usual (This is working on versions bellow): Add permission: <uses-permission android:name="android.permission.CALL_PHONE" /> Open the intent: Intent intent = new Intent(Intent.ACTION_CALL); intent.setData(Uri.parse("tel:" + getString(R.string.connect_phone))); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent); This is the log I'm getting: FATAL EXCEPTION: main Process: com.app.calling, PID: 4250 java.lang.SecurityException: Permission Denial: starting Intent { act=android

Error: Client must have ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION

坚强是说给别人听的谎言 提交于 2019-11-30 18:11:26
问题 I use a module in a another app. Before I implement the module, I set it on API Level 23 (compile and target) like my Main Project This works fine, except this Error. The Pproblem is, that Google has changed the permissions management since marshmellow. Finaly now, i dont know how and where I should set the permissions. This error I get when starting the application: java.lang.SecurityException: Client must have ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION permission to perform any

Permission issue while starting a service from android

三世轮回 提交于 2019-11-30 17:50:16
I have written a service as part of an application. I try to call this service from a second application using the following code: Intent intent = new Intent () ; intent.setClassName("com.test" ,"com.test.DownloadService") ; // Create a new Messenger for the communication back Messenger messenger = new Messenger(handler); intent.putExtra("MESSENGER", messenger); intent.setData(Uri.parse("http://www.vogella.com/index.html")); intent.putExtra("urlpath", "http://www.vogella.com/index.html"); this.startService(intent); It gives the following exception 07-10 09:27:28.819: ERROR/AndroidRuntime(4226)

Permission denied for window type 2002 in Android Studio

霸气de小男生 提交于 2019-11-30 16:51:41
问题 Today I installed latest version of Android Studio I am learning Floating Widgets in Android I started with applying this example https://www.spaceotechnologies.com/android-floating-widget-tutorial/ it compiles ok but when I run it in the emulator it crashes giving me this error 08-28 22:52:02.932 7400-7400/com.asmgx.MyApp.MyApp E/AndroidRuntime: FATAL EXCEPTION: main Process: com.asmgx.MyApp.MyApp, PID: 7400 java.lang.RuntimeException: Unable to create service com.asmgx.MyApp.MyApp

Android USB Device Permission and Intent Filter

此生再无相见时 提交于 2019-11-30 15:36:55
问题 I have an Android App which will interact with an USB device, in the Android developer official documentation for Obtaining permission to communicate with a device it says: Note : If your application uses an intent filter to discover USB devices as they're connected, it automatically receives permission if the user allows your application to handle the intent. If not, you must request permission explicitly in your application before connecting to the device. The Intent Filter is to be

Why do I need the WRITE_EXTERNAL_STORAGE permission with getExternalCacheDir() on Android Lollipop?

丶灬走出姿态 提交于 2019-11-30 15:02:16
问题 My app writes (and reads) cache files to the getExternalCacheDir() location. Before Android Lollipop (API 21) I've been using this permission with success: <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="18" /> The maxSdkVersion is there because this permission shouldn't be needed after API v18: http://developer.android.com/reference/android/Manifest.permission.html#WRITE_EXTERNAL_STORAGE But on Android Lollipop (5.0) I'm getting an access

Android USB Device Permission and Intent Filter

强颜欢笑 提交于 2019-11-30 14:33:51
I have an Android App which will interact with an USB device, in the Android developer official documentation for Obtaining permission to communicate with a device it says: Note : If your application uses an intent filter to discover USB devices as they're connected, it automatically receives permission if the user allows your application to handle the intent. If not, you must request permission explicitly in your application before connecting to the device. The Intent Filter is to be declared in the AndroidManifest.xml and using a resource file which will include the vendor-id and product-id.

Why do I need the WRITE_EXTERNAL_STORAGE permission with getExternalCacheDir() on Android Lollipop?

ε祈祈猫儿з 提交于 2019-11-30 13:03:24
My app writes (and reads) cache files to the getExternalCacheDir() location. Before Android Lollipop (API 21) I've been using this permission with success: <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="18" /> The maxSdkVersion is there because this permission shouldn't be needed after API v18: http://developer.android.com/reference/android/Manifest.permission.html#WRITE_EXTERNAL_STORAGE But on Android Lollipop (5.0) I'm getting an access permission like so (with my log output to show the actual path used): 11-19 13:01:59.257 4462-4541/com