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
99
votes
5 answers

SYSTEM_ALERT_WINDOW - How to get this permission automatically on Android 6.0 and targetSdkVersion 23

Facebook, Evernote, Pocket - all apps get this permission on Android 6.0 automatically, even though they are targeting 23 (targetSdkVersion=23). There has been a lot of documentation regarding the new Marshmallow permission model. One of them is…
99
votes
11 answers

How to add Apache HTTP API (legacy) as compile-time dependency to build.grade for Android M?

As mentioned here, Android M will not support the Apache HTTP API. The docs state to: use the HttpURLConnection class instead. or To continue using the Apache HTTP APIs, you must first declare the following compile-time dependency in your…
92
votes
10 answers

Can't get WRITE_SETTINGS permission

When I have a target API of 23 on Android M Preview 3, I cannot seem to acquire the Manifest.permission.WRITE_SETTTINGS permission. requestPermissions(new String[]{Manifest.permission.WRITE_SETTINGS}, 101); Request permission doesn't bring up the…
Justin
  • 3,322
  • 2
  • 22
  • 37
89
votes
1 answer

Method FloatMath.sqrt() not found

I'm using the new Android Marshmallow SDK and the method FloatMath.sqrt() is gone. What should I use now?
rekire
  • 47,260
  • 30
  • 167
  • 264
87
votes
4 answers

Neither user 10102 nor current process has android.permission.READ_PHONE_STATE

I am trying to call getCallCapablePhoneAccounts() method of android.telecom.TelecomManager class. Though i have added required user-permission, i am getting Security exception. Here is the line of code where i am getting…
Prasad
  • 870
  • 1
  • 6
  • 5
80
votes
13 answers

Android "Screen Overlay Detected" message if user is trying to grant a permission when a notification is showing

I have Android Marshmallow on a Nexus 6. I am trying to fix the following problem: If a user is trying to grant permission while a notification is showing, a "Screen overlay detected" message gets displayed and the Request Permission dialog…
Alexi Akl
  • 1,934
  • 1
  • 21
  • 20
80
votes
29 answers

Android M permission dialog not showing

I'm currently trying to adapt my application to the new permissions model of Android M. I'm collecting all the permissions I require, then run Log.i("Permissions", "Requesting permissions: " +…
Jens
  • 1,157
  • 1
  • 8
  • 17
78
votes
4 answers

Expand/Collapse Lollipop toolbar animation (Telegram app)

I'm trying to figure out how the expand/collapse animation of the toolbar is done. If you have a look at the Telegram app settings, you will see that there is a listview and the toolbar. When you scroll down, the toolbar collapse, and when you…
76
votes
12 answers

How to use the legacy Apache HTTP client on Android Marshmallow?

Background On Android Marshmallow, Google has completely removed the support of Apache HTTP client (link here) because it doesn't have good performance compared to the alternatives. This might also be the cause for so many apps crashing on Android…
android developer
  • 114,585
  • 152
  • 739
  • 1,270
75
votes
13 answers

Android Marshmallow: Test permissions with Espresso?

The new permissions scheme introduced by Android Marshmallow requires checking for specific permissions at runtime, which implies the need to provide different flows depending on whether the user denies or allows access. As we use Espresso to run…
argenkiwi
  • 2,134
  • 1
  • 23
  • 26
73
votes
9 answers

Android M Camera Intent + permission bug?

I'm trying to get my app ready for the new Android M permissions changes and found some weird behaviour. My app uses the Camera intent mechanism to allow the user to get a picture form the camera. But in another activity needs to make use of the…
70
votes
6 answers

Android FAB plus sign not present on android drawable

Where can I find the plus sign at the center of a Floating Action Button? Is it made by Android or do I need to do it by my self?
69
votes
16 answers

How to check the multiple permission at single request in Android M?

I want to use the android.permission.CAMERA android.permission.WRITE_EXTERNAL_STORAGE in single request using ActivityCompat.requestPermissions(Activity activity,new String permisionList[],int permissionRequestcode); But my problem is at time I…
Zala Janaksinh
  • 2,929
  • 5
  • 32
  • 58
67
votes
6 answers

How to WhiteList app in Doze mode Android 6.0

This question is related to the Android 6.0 Preview 3 which will be final released at the end of this month. I'm testing some stuff in Android 6.0 in the preview 3 from Google on Nexus 5 'hammerhead'. The new feature is the "doze mode" - something…
Fransis Q
  • 821
  • 1
  • 7
  • 11
67
votes
1 answer

Permission from manifest doesn't work in Android 6

It completely ignores: So I got exception: Caused by: android.view.WindowManager$BadTokenException: Unable to add window android.view.ViewRootImpl$W@86fb55b -- permission…
Djordje Tankosic
  • 1,975
  • 2
  • 20
  • 21