android-6.0-marshmallow

Android Marshmallow : java.lang.RuntimeException: Fail to connect to camera service

倖福魔咒の 提交于 2019-12-08 08:21:02
问题 I am using https://github.com/dlazaro66/QRCodeReaderView (QR code scanner ) in my android application My mainfest permission looks like this : <uses-permission android:name="android.permission.CAMERA" /> <uses-feature android:name="android.hardware.camera" /> <uses-feature android:name="android.hardware.camera.autofocus"/> and in Gradle I have the following code : compileSdkVersion 23 buildToolsVersion "23.0.2" defaultConfig { applicationId "com.gurkhatech.schoolmanagement" minSdkVersion 15

Doze mode and GCM notifications

喜欢而已 提交于 2019-12-08 08:12:34
问题 I've followed this stackoverflow post to set my Nexus 5 device to the 'IDLE' state with adb, after switching off the screen. > adb shell dumpsys battery unplug > adb shell dumpsys deviceidle step Stepped to: IDLE Despite this, I am able to see through my device logs the GCM notifications being received. 1-04 15:21:40.708 22138 26007 I GCM : GCM message com.sample.app 0:1446610899548646%82d6ec5bf9fd7ecd My understanding is that Doze mode will allow for certain maintenance windows where normal

ACTION_ASSIST intent on Marshmallow (Android 6.0)

我们两清 提交于 2019-12-08 07:36:32
问题 Is there a way to use the ACTION_ASSIST (Google now) intent on Android 6.0? I think this might have changed with the now on tap feature - but perhaps (hopefully) there is still a way to hook into this. 回答1: As stated by Dianne Hackborn: ACTION_ASSIST is deprecated, though if you turn off the new assistant you can select an old ACTION_ASSIST assistant to use instead (and then also get to select an old voice recognizer). You can choose a custom application, instead Google Now, here: Settings ->

How to add Multiple permissions in the permissions Request [duplicate]

一世执手 提交于 2019-12-08 07:22:33
问题 This question already has answers here : Android 6.0 multiple permissions (22 answers) Closed last year . I would like to know how to add multiple permissions on a single request. This is regarding the Marshmallow version of android. 回答1: You need to create an arraylist of permission required List<String> permissionsNeeded = new ArrayList<String>(); final List<String> permissionsList = new ArrayList<String>(); if (!addPermission(permissionsList, Manifest.permission.READ_PHONE_STATE))

Properly route non internet Wifi sockets & Cellular Internet request (Android L & M)

北慕城南 提交于 2019-12-08 06:37:50
问题 Is it possible to dedicate a WiFi network (to a device with no internet access) to a socket in an app and keep Cellular network as the default internet connection for the Android device (and other network requests from the app)? (Android 5 & 6) I can easily switch between WiFi and Cellular within the app but the main issue is when WiFi is up, Internet is not accessible anymore for the app and all apps already running on the device (i.e. streaming music, web browser, ...) I have tried to bind

How to ask for user permissions in Android 6

吃可爱长大的小学妹 提交于 2019-12-08 06:37:30
问题 I am totally confused regarding the new permission system in Android 6 (Marshmallow). I am using two so called 'dangeorus permissions' - <uses-permission android:name="android.permission.GET_ACCOUNTS" /> <uses-permission android:name="android.permission.READ_PHONE_STATE" /> And I use these permissions in many places. I need to access the user accounts for Registering the app, Sending Feedback etc.And I also access Device Id for registering the app. I wrote two functions to get the list of

Android permissions are set by default and application doesn't know if they are off

混江龙づ霸主 提交于 2019-12-08 05:36:09
问题 I updated xamarin android and now compile app using version 7.0(Nougat). But when I deploy app on 6.0.1(marshmallow), all permissions are already set. When I turn off location permission from settings, alert displays "this app was designed for an older version of android. denying permission may cause it to no longer function as intended". Then if we deny permission and method Context.CheckSelfPermission in the app return Permission.Granted anyway. Is this xamarin issue or something change in

How to capture images in background using Camera2 api?

南笙酒味 提交于 2019-12-08 05:36:03
问题 I am developing an Android security app, and I want to capture images in background without preview. Is it possible to capture images in the background using the camera2 api? 回答1: Yes, but as of Android 5.0 Marshmallow, you may be disconnected from the camera at any time, if a foreground app wants to use it instead. And before Android M, using the camera from the background is not recommended, since you'll block any foreground app from using it (the app will just get an error trying to open

Android DOZE mode GCM Priority

允我心安 提交于 2019-12-08 05:34:12
问题 For DOZE mode test, I am developing a sample GCM App on Android 6.0. As it's said, In DOZE mode the device would not wakeup for normal priority GCM. I wanted to check this. As per the documentation (https://developers.google.com/cloud-messaging/concept-options#setting-the-priority-of-a-message) Normal priority. This is the default priority for message delivery. Normal priority messages won't open network connections on a sleeping device, and their delivery may be delayed to conserve battery.

HttpURLConnnection request failures on Android 6.0 (MarshMallow)

自作多情 提交于 2019-12-08 05:31:56
问题 I am using Google's Volley library for my application project , that targets minimum api level 14.So, Volley library uses HttpURLConnection as the NetworkClient. Therefore , there should not be any issue related to Removal of Apache HTTPClient. However, I have done the configuration required for 6.0 Sdk i.e compileSdkVersion 23, build-tool-version 23.0.1 and build:gradle:1.3.1' and even tried adding useLibrary 'org.apache.http.legacy'. Have updated the same for Volley library project in my