Questions tagged [android-6.0-marshmallow]

Android Marshmallow, formerly known as just "Android M", is version 6.0 of Android, is supporting API Level 23, and began shipping in October 2015.

Android Marshmallow, formerly known as just "Android M", is version 6.0 of Android, and began shipping in October 2015.

It was first shown at Google I/O 2015, with the final name confirmed on August 17th.

All API changes

Here is a summary of the major API-changes:

  • Runtime Permissions
  • Power-Saving Optimizations
  • Adoptable Storage Devices
  • Apache HTTP Client Removal
  • AudioManager Changes
  • Notifications
  • Text Selection
  • Android Keystore Changes
  • Wi-Fi and Networking Changes
  • Camera Service Changes
  • Runtime
  • Access to Hardware Identifier
  • APK Validation
  • USB Connection
  • Android for Work Changes

Official:

2168 questions
38
votes
6 answers

Android 6.0 permission.GET_ACCOUNTS

I'm using this to get permission: if (ContextCompat.checkSelfPermission(context, Manifest.permission.GET_ACCOUNTS) != PackageManager.PERMISSION_GRANTED) { // Should we show an explanation? if…
SpyZip
  • 5,511
  • 4
  • 32
  • 53
36
votes
2 answers

How Do You Test the Android 6.0 Full-Backup Behavior?

TL;DR: How do you successfuly use the command-line tools (or anything else) to test the Android 6.0 backup and restore behavior, as I cannot get them to restore anything? Since I was running into problems earlier with a sample app from my book…
CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
34
votes
2 answers

REQUEST_IGNORE_BATTERY_OPTIMIZATIONS how to do it right

I have IntentService task in foreground mode, but in Android M+ the task stops in Doze mode. I read Google banned if the app uses intent to set themselves in whitelist. But if I use permission and check GRANT or DENIED, I get the granted result, but…
Delphian
  • 1,650
  • 3
  • 15
  • 31
34
votes
6 answers

Android M onRequestPermissionsResult in non-Activity

I have an application which needs to find the user location, and location is fetched in various classes, so i have written a separate class(Not an Activity class) that fetches user location using location services, it works fine under Android M but…
Muhammad Husnain Tahir
  • 1,009
  • 1
  • 15
  • 28
34
votes
4 answers

Can not switch to Doze mode

I am following instructions on this android page to switch android to doz mode to test my app, I have used a real device as well as emulator. But in both cases when I give the second command once or several times, which is adb shell dympsys…
Ahmed
  • 14,503
  • 22
  • 92
  • 150
34
votes
8 answers

Activity did not call finish? (API 23)

I am getting the following error and i have no clue as to why its happening. Error: 08-23 17:07:46.533 22454-22454/com.a.b.c E/AndroidRuntime﹕ FATAL EXCEPTION: main Process: com.a.b.c, PID: 22454 java.lang.RuntimeException: Unable to resume…
olfek
  • 3,210
  • 4
  • 33
  • 49
33
votes
4 answers

Android 6.0 Marshmallow BLE : Connection Parameters

The Bluetooth Low Energy connection parameters management seems to have changed in Android 6. I have a BLE Peripheral device who needs to use some specific connection parameters (notably, the connection interval), and I want to use the minimum…
33
votes
5 answers

Is it available to set checkSelfPermission on minimum SDK < 23?

New runtime permissions in Android-M asking for minimum 23 API level, but I still need minimum 16 API level in my project. So, how to make this code more forward-compatible? Regards
Ardi
  • 1,811
  • 4
  • 17
  • 29
33
votes
2 answers

Open app permission settings

Regarding granular permissions on Android M. In case the user denies twice the request for a permission, Or that the user mark the "Never ask again". How can I open/link directly to the app permissions settings?
David
  • 37,109
  • 32
  • 120
  • 141
32
votes
5 answers

Android custom permissions - Marshmallow

Background Historically, Android Custom permissions have been a mess and were install order dependent, which was known to expose vulnerabilities. Prior to API 21, there was an unsettling workaround whereby declaring the custom permission of another…
brandall
  • 6,094
  • 4
  • 49
  • 103
32
votes
4 answers
32
votes
9 answers

Get Bluetooth local mac address in Marshmallow

Pre Marshmallow my app would obtain it's device MAC address via BluetoothAdapter.getDefaultAdapter().getAddress(). Now with Marshmallow Android is returning 02:00:00:00:00:00. I saw some link(sorry not sure where now) that said you need to add the…
Eric
  • 781
  • 1
  • 10
  • 18
32
votes
4 answers

Android 6: cannot share files anymore?

I am sharing an image, and this code works properly for devices before Android 6: Intent shareIntent = new Intent(Intent.ACTION_SEND); shareIntent.setType("image/*"); Uri uri = Uri.fromFile(new…
Daniele B
  • 19,801
  • 29
  • 115
  • 173
32
votes
1 answer

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

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…
31
votes
5 answers

Call requires API level 23 (current min is 14): android.app.Activity#requestPermissions,checkSelfPermission

I am trying add run time permissions android(6.0.1) API 23,If I use SDK version(min and target version both 23) it woks fine, like below, If I…