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
30
votes
6 answers

Android getAllNetworkInfo() is Deprecated. What is the alternative?

I want to use the ConnectivityManager which provides the getAllNetworkInfo() method for checking the availability of network in Android. This method was deprecated in API level 23. And the developer documentation is suggesting to use…
Anees U
  • 1,077
  • 1
  • 12
  • 20
29
votes
5 answers

Force application to restart from first Activity (when a permission is denied)

It is known that when we deny permissions at runtime in Android 6.0 and resume the app from the recent menu, the app process is killed and the app is forcibly restarted. This is allegedly in order to prevent any security snafus: It is remarkable…
29
votes
5 answers

CollapsingToolBarLayout - status bar scrim color doesn't change

I updated my android studio few days ago and started working with the CoordinatorLayout and CollapsingToolbarLayout just trying stuff. It seems that the Toolbar scrim colour override the status bar initial colour and the status bar scrim colour…
29
votes
2 answers

Android marshmallow dynamic permission change kills all application processes

Observation: Manually changing permission of Android application killed all processes for this application. Procedure: Go to Settings->Apps Select application and Permissions. Disable one of the permissions. Device: Nexus 6 device running Android…
user802467
  • 951
  • 2
  • 14
  • 22
29
votes
3 answers

How to deal with removal of a permission for a broadcast receiver in Android M?

I've got some legacy code which I am making permission safe for Marshmallow. There is a broadcast using the PHONE_STATE permission as follows:
Gruntcakes
  • 37,738
  • 44
  • 184
  • 378
29
votes
4 answers

Bluetooth LE Scan fails in the background - permissions

The following code works great on my Nexus 9 running Android 5.1.1 (Build LMY48M), but won't work on a Nexus 9 running Android 6.0 (Build MPA44l) List filters = new ArrayList(); ScanSettings settings = (new…
29
votes
2 answers

ConnectivityManager.requestNetwork in Android 6.0

I'm trying to get the new ConnectivityManager.bindProcessToNetwork(Network) using ConnectivityManager.requestNetwork(NetworkRequest, ConnectivityManager.NetworkCallback) The reason is to force the app to call the future request in some specific…
Deividi Cavarzan
  • 10,034
  • 13
  • 66
  • 80
29
votes
2 answers

Apache HTTP connection with Android 6.0 (Marshmallow)

Is there is any way to include the Apache library directly in Gradle to make it work with Android 6.0 ? I've tried to include the libraries like that: compile 'org.apache.httpcomponents:httpcore:4.4.1' compile…
29
votes
5 answers

Android M: Programmatically revoke permissions

I am currently playing around with android m's new permission system. What i am planning is to add a screen to my in-app settings where the user can grant or revoke permissions. The screen would look like the regular system settings screen, but…
W3hri
  • 1,563
  • 2
  • 18
  • 31
28
votes
1 answer

Turn off app permissions programmatically

How can I deny certain app permissions programatically or deny all app permissions at once in marshmallow? I do not want to revoke them, I just want to turn them off from my app, not through app settings. I know I can use Intent to open app settings…
28
votes
1 answer

How to debug/reset Android 6.0 permissions?

While migrating one of my apps to use the Android 6.0 permissions system, I found it very hard to debug permissions using the emulator. Findings: Disabling a permission in the app info screen doesn't re-show the grant permission dialog when using…
28
votes
2 answers

How to get Chrome History & Bookmarks in Android Marshmallow (API>=23)?

Till API Level 22 (i.e. till Lollipop), there has been a way to read History and Bookmarks from the Chrome app (as shown in this thread) using the permission com.android.browser.permission.READ_HISTORY_BOOKMARKS. Now, in Android API=23 Marshmallow,…
28
votes
9 answers

Get JSON Data from URL Using Android?

I am trying to get JSON data by parsing login url with username and password. I have tried by using below code but I can't get any responses. Please help me. I am using HTTP Process and API level 23. I need to parse my URL and get below Response { …
android
  • 453
  • 3
  • 7
  • 14
28
votes
11 answers

Android 6.0 Dialog text doesn't appear

I updated my phone to Android 6.0 and I have these 2 problems with dialogs: 1)The title is shown but the messages isn't for alert dialog(SOLVED): new AlertDialog.Builder(context).setTitle("Title").setMessage("Message"); 2)Also custom…
28
votes
2 answers

Provide custom text for Android M permission dialog

Is it possible to provide a custom text for the system dialog which is displayed when the user is asked to grant permission?
rfsk2010
  • 8,571
  • 4
  • 32
  • 46