android-6.0-marshmallow

Cordova camera plugin permission denial in android 6.0

喜夏-厌秋 提交于 2019-12-06 11:47:46
问题 I am using ionic to develop a mobile application. The application requires camera. I added Cordova camera plugin to my project. Also I am using ngCordova wrapper. The application was working fine. Last day I used one device with android version 6.0 (Marshmallow) to test my app. when I click on the button it directly triggers the error. I done USB debugging, I got the error that Camera Error "Permission Denial: starting Intent { act=android.media.action.IMAGE_CAPTURE flg=0x3 cmp=com.google

Unplugging the device via ADB: “can't find service”

岁酱吖の 提交于 2019-12-06 09:17:47
问题 I have to test how my app behaves in doze mode. According to the documentation, I first must make the device think it's unplugged by entering the following command in the terminal: $ adb shell dumpsys battery unplug However, nothing happens and it logs: Can't find service: battery What should I do? 回答1: There is no battery service as the log points out (this may be device specific). Enter the following command to find existing battery related services: $ adb shell service list | grep battery

android-MNC project won’t run on devices prior to API level 'android-MNC'

五迷三道 提交于 2019-12-06 07:48:48
Shortly after the Google I/O keynote and the consecutive talks about Android M features, I started playing around with the new SDK functions, e.g., runtime permissions. For that it is necessary to set the compileSdkVersion as well as the targetSdkVersion to android-mnc . When running the project on a Nexus 5 with the Android M Developer Preview installed, Android Studio installs the application and it works fine on the device. If I set the minSdkVersion to, e.g., 10 to test it on a 2.3.6 device or to 21 to test it on a 5.0 device, it still works on the M-Nexus5 but not on the aforementioned

Android M email completition

五迷三道 提交于 2019-12-06 07:33:06
问题 as you know the permission system on Android M has been updated. I currently use the permission GET_ACCOUNTS to autocomplete the user email when he sign in/sign up on my app. final ArrayList<String> emails = new ArrayList<String>(); for (Account account : AccountManager.get(this).getAccounts()) { emails.add(account.name); } email.setAdapter(new ArrayAdapter<>(this, android.R.layout.simple_dropdown_item_1line, emails)); The problem is that on Android M, to continue to use this feature, I'll

vibrate_when_ringing on Android Marshmallow (6.0)

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-06 07:02:34
问题 In my code I have: Settings.System.putInt(this.getContentResolver(), "vibrate_when_ringing", isVibrateWhenRinging ? 1 :0); Using the following permission: <uses-permission android:name="android.permission.WRITE_SETTINGS" /> This was working fine from Jelly Bean (API 16) till Lollipop (API 22). In Android M, I know that for using that permission I need to prompt the user to Settings.ACTION_MANAGE_WRITE_SETTINGS. However, even with that permission turned on, I see the following error: E

Testing Doze feature (Android 6.0 Marshmallow) in Genymotion

本秂侑毒 提交于 2019-12-06 06:18:51
问题 I've tried the commands from Google adb shell dumpsys battery unplug adb shell dumpsys deviceidle step on both "PREVIEW - Google Nexus 6P - 6.0.0 - API 23 - 1440x2560" and "PREVIEW - Google Nexus 5X - 6.0.0 - API 23 - 1080x1920" virtual devices from Genymotion but unfortunately cannot put anyone to idle mode. Always after second command I see Stepped to: ACTIVE . Then trying adb shell dumpsys deviceidle force-idle I see Unable to go idle; not enabled . This is strange because Genymotion

href to “add to calendar” from web not working with native google calendar app on Android 6.0+

与世无争的帅哥 提交于 2019-12-06 06:05:10
We have some href's linking to .ics files and google calendar etc. Everything works perfectly on the web and iOS devices. However, when linking to "Add to calendar" from Android 6.0+ within chrome, it auto opens the Google Calendar, which is expected, but then it just says "Event not found". Our links are setup the same way as suggested answer in: Link to add to google calendar Doing some research there looks to be some issues with Android 6.0 and google calendar, but I'm wondering if on an Android 6.0+ device if anyone has found a workaround solution to get "Add to calendar" href link to add

Is it possible to create a custom floating text selection menu in Android versions pre Marshmallow?

旧时模样 提交于 2019-12-06 06:04:01
问题 I'm looking to create a custom menu for text selection. I know it's possible to edit the behaviour of the action bar with setCustomSelectionActionModeCallback, but in my case I don't want that action bar to show at all, I want my own floating custom menu which I have already achieved. Only thing is that there is no way to not show the action bar menu after selecting the text in the TextView. The behaviour I need is not the standard cut/copy/paste, the actions I have implemented are for

Application (WiFi connections) doesn't work anymore on Android 6.0 Marshmallow

余生长醉 提交于 2019-12-06 05:00:42
问题 My application stopped working once I upgraded to Marshmallow, it was supposed to be able to change the WiFi connection, but now it doesn't do anything at all. I've spent some time reading about the new permission model of the Android 6.0. Well awesome, but old apps should continue working... Anyway, I started trying to implement the granting of permission, but realized that this is a normal permission and there should be done no permission request for it if it's defined in android manifest:

App crashes with SecurityException on Android M [duplicate]

≯℡__Kan透↙ 提交于 2019-12-06 03:36:07
This question already has answers here : Android 6.0 Permission Error (5 answers) Closed 4 years ago . Yesterday I set upped target and compile sdk to 23 API level. When I launched the app on Nexus 9 with Preview Android M (MPA441) the app crashes with following SecurityException : FATAL EXCEPTION: main Process: com.grouplogic.mobilecho, PID: 22554 java.lang.RuntimeException: Unable to create application com.mypackage.MyApplication: java.lang.SecurityException: getDeviceId: Neither user 10098 nor current process has android.permission.READ_PHONE_STATE. at android.app.ActivityThread