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
17
votes
9 answers

Not allowed to load local resource: ionic 3 android

I am using ionic 3 android build apk and trying to laod image from file:///storage/emulated/0/data/io.ionic.vdeovalet/cache/image.jpeg takePicture(sourceType) { try { // Create options for the Camera Dialog var options…
Muneeb Khan
  • 169
  • 1
  • 1
  • 5
17
votes
0 answers

How to detect if App has gone in or out of App Standyby Mode ( Android M+)

If the device is in DOZE IDLE or IDLE_MAINTENANCE mode, these events can be received if we register a broadcast receiver for "android.os.action.DEVICE_IDLE_MODE_CHANGED". But this receiver is not working when making App to go into App Standby using…
17
votes
2 answers

Getting mobile data usage history using NetworkStatsManager

I want to know the data usage history and noticed the "new" android-6 NetworkStatsManager which seems positive (I've used TrafficStats a while but that won't cover anything previous a reboot). From the API documentation: NOTE: This API requires…
dacwe
  • 43,066
  • 12
  • 116
  • 140
17
votes
1 answer

How do we toggle on MTP more easily on a Debug-Enabled Android 6.0 device?

In Android 6.0, MTP no longer works automatically: Device connections through the USB port are now set to charge-only mode by default. To access the device and its content over a USB connection, users must explicitly grant permission for such…
CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
17
votes
2 answers

Doze mode and foreground service

Checking my app's behavior on M Preview device, it seems that its foreground (with active notification) service playing music is not affected by Doze mode. But reading docs it seems that foreground services are exempt only from AppStandby. What is…
GPack
  • 2,494
  • 4
  • 19
  • 50
17
votes
1 answer

SMSMessage createFromPdu with extra parameter format

What should I pass as second parameter<"format"> to createFromPdu() method, SmsMessage currentMessage = SmsMessage.createFromPdu((byte[]) pdusObj[i], format); As in latest version of android following line of code is deprecated, SmsMessage…
Kislay Kumar
  • 243
  • 1
  • 2
  • 10
17
votes
2 answers

Marshmallow permission implementation

I am trying to add Android 6.0 support in my Existing Android App. I have used SYNCADAPTER to sync data. its working fine till API 22. but in 23 (ANDROID 6.0) they have remove Group permission AUTHENTICATE_ACCOUNTS. I found sample how to get…
17
votes
2 answers

How to use the new Android M feature of "Text Selection" to be offered from outside of your app?

Background Android M presents a new way to handle selected text (link here), even from outside of your app . Text selection can be handled as such: I know it's possible to handle the selected text from outside the app, because if I go to the web…
android developer
  • 114,585
  • 152
  • 739
  • 1,270
16
votes
6 answers

Application crashes only in release version

When you run the application in debug mode the app can't crash. But when generates the .apk file release the app crash. This error does not happen on all phones, in just a few that have the android 6. The logcat shows that the problem is a…
Jordan Junior
  • 1,090
  • 10
  • 11
16
votes
5 answers

Android M permissions close my app

I check for the required permissions on my Log In screen. The dialog shows asking for the 4 permissions I need. All good, but when the dialog appears, the background becomes black and my app closes (doesn't crash, just closes). When I'm done with…
N. Park
  • 387
  • 4
  • 14
16
votes
4 answers

PercentRelativeLayout inside ScrollView

I have created a layout using a ScrollView which has a PercentRelativeLayout as its child. It doesn't work on Lollipop and older devices but works fine on Marshmallow devices. Please check the code below:
16
votes
1 answer

how long does it take for android to transition into doze mode?

In android version 6.0+ assuming user has left the android somewhere, unplugged, power button pressed to lock it etc.. How much time does android spend in each state such as inactive, idle pending etc before it finally gets into idle ? Now once in…
Ahmed
  • 14,503
  • 22
  • 92
  • 150
16
votes
3 answers

Displaying images from SDCard in a Widget from MarshMallow

In a widget I display images from SDCard using remoteView.setImageViewUri(). This strategy works correctly except with MarshMallow: The error is: Unable to open content: file:///storage/emulated/0/Android/data/applicaitonPackage/files/file.png open…
lujop
  • 13,504
  • 9
  • 62
  • 95
16
votes
6 answers

Read and Write permission for storage and gallery usage for marshmallow

I am developing an android app in which it is required to provide permission for Read and write external storage. My requirement is to select a picture from gallery and use it in my app. Everything is working fine except Marshmallow devices. I want…
16
votes
3 answers

Android Robolectric unit test for Marshmallow PermissionHelper

I wanna learn Robolectric to use it for unit tests on an Android Marshmallow app. I wrote a PermissionHelper with some methods to make permission handling a bit easier. To get started with unit tests for this class, I am trying to test the most…