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
66
votes
15 answers

Android M Light and Dark status bar programmatically - how to make it dark again?

In the Android M we have ability to make status bar icons dark. To do that we can specify attribute in the theme's xml: true OR we cat set it at runtime with this code: View someView =…
65
votes
10 answers

How Do We Distinguish Never-Asked From Stop-Asking in Android M's Runtime Permissions?

When it comes to the M Developer Preview runtime permissions, according to Google: If you have never asked for a certain permission before, just ask for it If you asked before, and the user said "no", and the user then tries doing something that…
CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
61
votes
11 answers

onRequestPermissionsResult not being called in dialog fragment

I have started to work on Android M runtime permission. Here I am facing the issue that if requestPermissions is called from Dialog Fragment class then onRequestPermissionsResult not getting called in the same Dialog fragment class. But if…
60
votes
11 answers

Request runtime permissions from v4.Fragment and have callback go to Fragment?

I'm having a weird issue that is causing a conflict. I had to switch to native Fragments to fix it, but there are bugs with that. My original problem: I have a navigation drawer setup with v4 Fragments. To ask for permission in one of my Fragments I…
RED_
  • 2,997
  • 4
  • 40
  • 59
58
votes
9 answers

Android 6.0 open failed: EACCES (Permission denied)

I have added uses-permission including WRITE_EXTERNAL_STORAGE,MOUNT_UNMOUNT_FILESYSTEMS,READ_EXTERNAL_STORAGE to AndroidManifest.xml. When I tried to run my application in Nexus5 (Android 6.0),it threw a exception as below: java.io.IOException: open…
HelloSilence
  • 935
  • 2
  • 7
  • 19
56
votes
1 answer

SecurityException: not allowed to perform OP_READ_PHONE_STATE

User is reporting my app crashes with this error trace java.lang.SecurityException: com.android.phone from uid 10134 not allowed to perform OP_READ_PHONE_STATE at android.os.Parcel.readException(Parcel.java:1620) at…
kencorbin
  • 1,958
  • 1
  • 20
  • 18
55
votes
9 answers

Using DataBinding library for binding events

I'm trying to bind events with views in xml using DataBinding Library shipped with Android M. I'm following examples from Android Developers and implementing step-by-step. for the view's attributes like visibility,text its working fine but if I try…
54
votes
2 answers

How to make Alarm Manager work when Android 6.0 in Doze mode?

I am a developer of two alarm clock apps on Google Play. I am trying to get them to work with Android 6.0. However, Doze mode makes it so they do not ring. I put them on the white list, I put a foreground notification icon up, I'm not sure what…
user1908060
  • 683
  • 1
  • 6
  • 8
53
votes
4 answers

setExactAndAllowWhileIdle - is not exact as of developer reference

AlarmManager on API19 has the method setExact() to set an exact alarm. Exact means --> If I set an alarm to 2:01 pm it will be triggered at 2:01 pm On API 23 - Marhsmwallow (6.0) there is a new method setExactAndAllowWhileIdle(), but as of the…
chrisonline
  • 6,949
  • 11
  • 42
  • 62
53
votes
3 answers

How to set Android M default USB config to MTP rather than "charging only"?

Whenever my device (Nexus 5, Android M Preview 3) connects via USB, the USB config always defaults to "charging only". This is quite problematic because the USB port on my device is faulty and sometimes disconnects and reconnects when bumped and so…
Will Hardwick-Smith
  • 969
  • 3
  • 13
  • 24
53
votes
9 answers

How to check Grants Permissions at Run-Time?

In Android M (Preview) the user can choose a specific app and retreive specific permission. So I am asking How to check Grants Permissions at Run-Time?
TooCool
  • 10,598
  • 15
  • 60
  • 85
52
votes
6 answers

Testing Accessibility on Emulated Device (Marshmallow)

I want to test the accessibility of my app in emulator (particularly Talkback) but it seems that the option is missing in emulator. Here is the screen shot from the emulator in accessibility settings: There are two options "ClockBack" and…
Pooya
  • 6,083
  • 3
  • 23
  • 43
52
votes
1 answer

How to open application permission window in app settings programmatically

I'm working on new permission model (Android 6.0 Marshmallow) and I wonder is there a way to open the application's permission window programmatically? not only application details I managed to open the second screen using something like…
52
votes
5 answers

Android 6.0 Marshmallow. Cannot write to SD Card

I have an app that uses external storage to store photographs. As required, in its manifest, the following permissions are requested
RudyF
  • 805
  • 1
  • 10
  • 16
52
votes
2 answers

Go to My app's App Permission screen

Is there an Intent to go to my Application's "App Permissions" screen in Android-M? I am making my App ready for Android-M and with the new permissions model. I have followed all the steps mentioned in the…
luckylukein
  • 819
  • 1
  • 7
  • 17