android-6.0-marshmallow

Flashlight control in Marshmallow

谁都会走 提交于 2019-12-20 18:28:18
问题 I have a problem regarding the camera in the most recent Marshmallow build, more specifically the flashlight. On any pre-Marshmallow version all I need to do to turn the flash on/off was the following: private void turnFlashOn(final Camera camera, int flashLightDurationMs) { if (!isFlashOn()) { final List<String> supportedFlashModes = camera.getParameters().getSupportedFlashModes(); if (supportedFlashModes != null && supportedFlashModes.contains(Camera.Parameters.FLASH_MODE_TORCH)) { mParams

FileObserver does not work on external storage in Android 6.0 Marshmallow (API 23)

落花浮王杯 提交于 2019-12-20 16:20:29
问题 I have an app that observes a public directory on external storage with FileObserver . It works fine on Lollipop devices. I want to add support for Marshmallow , so I set up a Nexus 9 tablet with it. On the Marshmallow device, it fails, on Lollipop device it's OK. On Marshmallow device, the FileObserver does not react to file system events that are caused by other processes. E.g. taking a screenshot, creating files via adb shell. It works fine if the files are created by my app. On

FileObserver does not work on external storage in Android 6.0 Marshmallow (API 23)

帅比萌擦擦* 提交于 2019-12-20 16:19:34
问题 I have an app that observes a public directory on external storage with FileObserver . It works fine on Lollipop devices. I want to add support for Marshmallow , so I set up a Nexus 9 tablet with it. On the Marshmallow device, it fails, on Lollipop device it's OK. On Marshmallow device, the FileObserver does not react to file system events that are caused by other processes. E.g. taking a screenshot, creating files via adb shell. It works fine if the files are created by my app. On

E/libEGL: validate_display:255 error 3008 (EGL_BAD_DISPLAY) on Nexus 9 + Android 6

最后都变了- 提交于 2019-12-20 12:36:37
问题 I'm porting an old big application in Cordova 3.4, from Eclipse to Android Studio because this application used a library that now has been updated in Android 6. After some issues with build.gradle and settings.gradle, the App builds, runs and I can make the apk. Every thing works fine on devices with Android 5. With Android 6 on Nexus 9 the app crashes, with a white screen with this error: E/libEGL: validate_display:255 error 3008 (EGL_BAD_DISPLAY) On Internet I've found few answers to this

Android Marshmallow, “dangerous” protection level and system components/apps

喜欢而已 提交于 2019-12-20 10:06:06
问题 I'm developing an application that going to be pr-installed (as a system app) on the firmware. from the documentation so far about the relation between system apps, new permissions model, and the protection levels - I don't understand exactly when system app needs (if at all) to request user permission. My problems starts when I try to use the WRITE_EXTERNAL_STORAGE permission. from the documentation I can see that it marked as "dangerous" permission. - does "dangerous" permissions grant

onLeScan from BluetoothAdapter.LeScanCallback not called in Android Marshmallow

随声附和 提交于 2019-12-20 05:09:05
问题 I've just updated my Nexus 5 and my app's feature has stopped working. The reason is that the interface LeScanCallback is not calling the function onLeScan . On the below code, I'm using some deprecated code, but I need to do it since I'm testing some technology. This is how I start my bluetooth adapter: @Override protected void onStart() { super.onStart(); // Check if the device has BLE if (!this.getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) { bleNotSupported();

Android M Request Multiple permission at a single time

Deadly 提交于 2019-12-20 03:16:33
问题 Hi i am updating my application jaffna Temples . so that it can support Android M devices (v 6.0 and above). Is there a way i can request multiple permission at a single time. eg: I want to get the permission to read phone state and location information at the same time. Using this ways i can request permission one by one. But i want to rest both permission at once at the start of the application. if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { if (checkSelfPermission(Manifest

Android M Request Multiple permission at a single time

血红的双手。 提交于 2019-12-20 03:16:06
问题 Hi i am updating my application jaffna Temples . so that it can support Android M devices (v 6.0 and above). Is there a way i can request multiple permission at a single time. eg: I want to get the permission to read phone state and location information at the same time. Using this ways i can request permission one by one. But i want to rest both permission at once at the start of the application. if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { if (checkSelfPermission(Manifest

“Write settings” permission not granted marshmallow android

狂风中的少年 提交于 2019-12-19 19:53:46
问题 <uses-permission android:name="android.permission.WRITE_SETTINGS" I have declared above line in my manifest ,and i ask for permission on activity start but unlike other permissions,after restarting my app,it again asks for permission.When i check if permission has been granted or not,i get result that says not granted for only this permission but when i checked the same thing with other permissions ,they are granted after the user has done so. ActivityCompat.requestPermissions(SplashScreen

Android 6.0 needs restart after granting user permission at runtime

本秂侑毒 提交于 2019-12-19 12:49:17
问题 I follow this guide to ask for permissions for Android 6.0, https://developer.android.com/preview/features/runtime-permissions.html#support-lib However, I have to destroy my application and re-launch to actually have the WRITE_EXTERNAL_STORAGE permission, otherwise it keeps failing for file creation. Am I missing something? if(ActivityCompat.checkSelfPermission(mContext, Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_DENIED){ ActivityCompat.requestPermissions(