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

Android M request permission non activity

My widget makes calls to secure permissions outside of an Activity scope. Is it possible to request permissions for Android M outside of an Activity?
Dave Honly
  • 568
  • 1
  • 4
  • 5
48
votes
3 answers

How do I properly fire ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS intent?

As stated in the documentation: "An app holding the REQUEST_IGNORE_BATTERY_OPTIMIZATIONS permission can trigger a system dialog to let the user add the app to the whitelist directly, without going to settings. The app fires a…
48
votes
3 answers

Bluetooth Low Energy startScan on Android 6.0 does not find devices

I'm developing an application with Bluetooth Low Energy using Nexus 5. It worked on Lollipop and now it is not working on Marshmallow. I set the ACCESS_COARSE_LOCATION and ACCESS_FINE_LOCATION permissions in the manifest and on runTime in the…
48
votes
2 answers

How does storage access change on Android 6?

Background Android had a lot of changes as to how to handle the SD-card and storage in general: API 3 - you get all access, no permission needed API 4-15 - you need to use WRITE_EXTERNAL_STORAGE, and you get all access. API 16-18 - if you wish only…
48
votes
3 answers

Android M weird shared preferences issue

On my Nexus 5 running Android M Developer Preview 2, when uninstalling/reinstalling an app, the device is retrieving shared preferences I stored long ago, for instance a boolean isFirstLaunch. The only way to clear these is to do it manually from…
nios
  • 1,153
  • 1
  • 9
  • 20
47
votes
12 answers

App links intent filters in assetlinks.json not working on Android

My app defines the intent filters to handle URL's from my site defined by
shadowcursor
  • 1,174
  • 1
  • 13
  • 19
45
votes
1 answer

Android: what to choose for requestcode values?

Methods like ActivityCompat.requestPermissions require that I pass them a requestcode that I can later test in a callback (in this case onRequestPermissionsResult). Is there some best practice sort of value I'm supposed to pass in the requestcode?…
45
votes
4 answers

Crash casting AndroidKeyStoreRSAPrivateKey to RSAPrivateKey

I'm following this tutorial: How to use the Android Keystore to store passwords and other sensitive information. It (loosely) ties up with the Google Sample app: BasicAndroidKeyStore. I can encrypt my data using the public key, and I can decrypt on…
James
  • 3,485
  • 3
  • 20
  • 43
45
votes
5 answers

SCAN_RESULTS_AVAILABLE_ACTION return empty list in Android 6.0

Yesterday my Nexus 5 receive the update from Android MNC to version 6.0 - Marshmallow. Since then, the action to scan the networks available in the device stop receiving the list, in this case the result list have a size of 0, even with 10+ Wifi…
Deividi Cavarzan
  • 10,034
  • 13
  • 66
  • 80
45
votes
5 answers

Can you request permissions synchronously in Android Marshmallow (API 23)'s runtime permissions model?

Say you have a method like this: public boolean saveFile (Url url, String content) { // save the file, this can be done a lot of different ways, but // basically the point is... return save_was_successful; } Throughout your app, if you…
fattire
  • 6,823
  • 3
  • 25
  • 38
39
votes
8 answers

Android notification setSound is not working

In my hybrid Cordova Android app targeting API 23+ I want to use a custom sound for notifications. To that end I have done the following In plugin.xml file for the single custom plugin I use in the app I declare
DroidOS
  • 8,530
  • 16
  • 99
  • 171
39
votes
5 answers

ALLOW button not working after update

On the devices which have installed the latest update of Android Marshmallow - that is June2016 update, when I ask for permissions, the ALLOW button is not working. I have tested with these 2 devices: Nexus 6p (Andoid version - 6.0.1, Build number -…
Helen Hakobyan
  • 734
  • 1
  • 8
  • 18
39
votes
3 answers

How can I customize the permission dialog in Android?

Suppose I request a permission at runtime like the following: ActivityCompat.requestPermissions( thisActivity, new String[]{Manifest.permission.READ_CONTACTS, MY_PERMISSIONS_REQUEST_READ_CONTACTS} ); The Android system creates a popup…
39
votes
8 answers

Calling DialogFragment's show() from within onRequestPermissionsResult() causes IllegalStateException in Marshmallow

Steps: Request a permission from Fragment or Activity Show a DialogFragment from within onRequestPermissionsResult() java.lang.IllegalStateException is thrown: Can not perform this action after onSaveInstanceState This doesn't happen when I show…
38
votes
2 answers

Request Location Permissions from a service Android M

I am using a service that on boot starts up and begins to check for location updates. Once i deny location access on permission popup now thanks to Android M my service crashes once the phone boots up. Since i have no activity in this case the call…
stud91
  • 1,854
  • 6
  • 31
  • 56