Top Banner
Juan Pablo Proverbio https://nz.linkedin.com/in/proverbio Marshmallow 6.0
30

Marshmallow 6 - files.meetup.com Marshmellow - 27-10-20… · Introduction to Marshmallow Android Marshmallow 6.0 focus is: Security - e.g Runtime permissions, Fingerprint auth, etc

Jun 15, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Marshmallow 6 - files.meetup.com Marshmellow - 27-10-20… · Introduction to Marshmallow Android Marshmallow 6.0 focus is: Security - e.g Runtime permissions, Fingerprint auth, etc

Juan Pablo Proverbiohttps://nz.linkedin.com/in/proverbio

Marshmallow 6.0

Page 2: Marshmallow 6 - files.meetup.com Marshmellow - 27-10-20… · Introduction to Marshmallow Android Marshmallow 6.0 focus is: Security - e.g Runtime permissions, Fingerprint auth, etc

Juan Pablo Proverbiohttps://nz.linkedin.com/in/proverbio

Introduction to Marshmallow

Page 3: Marshmallow 6 - files.meetup.com Marshmellow - 27-10-20… · Introduction to Marshmallow Android Marshmallow 6.0 focus is: Security - e.g Runtime permissions, Fingerprint auth, etc

Introduction to Marshmallow

Android Marshmallow 6.0 focus is:

● Security - e.g Runtime permissions, Fingerprint auth, etc

● Battery Life - e.g Doze and Standby mode

● Multimedia - e.g Audio, Camera, Video, etc

● Usability - Direct Share, Voice Interactions, etc

Page 4: Marshmallow 6 - files.meetup.com Marshmellow - 27-10-20… · Introduction to Marshmallow Android Marshmallow 6.0 focus is: Security - e.g Runtime permissions, Fingerprint auth, etc

Marshmallow release and rollout state

● It’s been officially released in October 2015

● It currently rolling out to Google Nexus devices

● HTC, LG and Motorola will rollout very soon, planned before end of year 2015

● Samsung, Sony, Huawei will join the party at the beginning of 2016

Page 5: Marshmallow 6 - files.meetup.com Marshmellow - 27-10-20… · Introduction to Marshmallow Android Marshmallow 6.0 focus is: Security - e.g Runtime permissions, Fingerprint auth, etc

Juan Pablo Proverbiohttps://nz.linkedin.com/in/proverbio

Runtime Permissions

Page 6: Marshmallow 6 - files.meetup.com Marshmellow - 27-10-20… · Introduction to Marshmallow Android Marshmallow 6.0 focus is: Security - e.g Runtime permissions, Fingerprint auth, etc

Runtime Permissions

● Google Play no longer requests permissions at

installation time

● Users can get into your app quicker than ever

before

● Gives more control and visibility to users

● Permissions are simplified using permission groups

Page 7: Marshmallow 6 - files.meetup.com Marshmellow - 27-10-20… · Introduction to Marshmallow Android Marshmallow 6.0 focus is: Security - e.g Runtime permissions, Fingerprint auth, etc

Runtime Permissions

● Permission groups contain multiple

permissions and you can get them at once

● If you add a new permission in a new release

the user doesn’t get blocked by them

● The new permission model enhances the

overall User Experience

Page 9: Marshmallow 6 - files.meetup.com Marshmellow - 27-10-20… · Introduction to Marshmallow Android Marshmallow 6.0 focus is: Security - e.g Runtime permissions, Fingerprint auth, etc

Doze and App Standby

Juan Pablo Proverbiohttps://nz.linkedin.com/in/proverbio

Page 10: Marshmallow 6 - files.meetup.com Marshmellow - 27-10-20… · Introduction to Marshmallow Android Marshmallow 6.0 focus is: Security - e.g Runtime permissions, Fingerprint auth, etc

Doze and App Standby

● These are two power-saving features that extend battery life

● All apps running on Android 6.0 are affected and should be optimized for them

● These modes manage and restrict the behaviour of apps

Page 11: Marshmallow 6 - files.meetup.com Marshmellow - 27-10-20… · Introduction to Marshmallow Android Marshmallow 6.0 focus is: Security - e.g Runtime permissions, Fingerprint auth, etc

Understanding Doze Mode

● When the device is unplugged and stationary for a period of time, with the

screen off, the device enters Doze mode

● This mode suspends access to intensive CPU services, network, jobs, sync

adapters and standard alarms

● Provides a maintenance window where those restrictions are disabled

Page 12: Marshmallow 6 - files.meetup.com Marshmellow - 27-10-20… · Introduction to Marshmallow Android Marshmallow 6.0 focus is: Security - e.g Runtime permissions, Fingerprint auth, etc

Understanding Doze Mode

Page 13: Marshmallow 6 - files.meetup.com Marshmellow - 27-10-20… · Introduction to Marshmallow Android Marshmallow 6.0 focus is: Security - e.g Runtime permissions, Fingerprint auth, etc

Doze Mode Restrictions

● Network access it suspended

● The system does not allow Sync Adapters to run

● Standard AlarmManager alarms are deferred to the next maintenance window

● If you need to set alarms to fire in Doze

mode use setAndAllowWhileIdle() or setExactAndAllowWhileIdle()

● Alarms set with setAlarmClock() continue to fire normally

● The System does not perform WIFI scans

● The system ignores wake locks

● The system does not allow JobScheduler to run

Page 14: Marshmallow 6 - files.meetup.com Marshmellow - 27-10-20… · Introduction to Marshmallow Android Marshmallow 6.0 focus is: Security - e.g Runtime permissions, Fingerprint auth, etc

App Standby

● It allows the system to determine that an app is idle when the user is not

actively using it

● App Standby will automatically put unused apps to sleep. It’s basically

disabled.

Page 15: Marshmallow 6 - files.meetup.com Marshmellow - 27-10-20… · Introduction to Marshmallow Android Marshmallow 6.0 focus is: Security - e.g Runtime permissions, Fingerprint auth, etc

App Standby

● If the device is idle for long periods of time, the system allow idle apps network

access around once a day

● In standby mode, network access is disabled, and syncs and scheduled jobs

all get shut down. The app won't be able to run any background services

● When the device is plugged, the system releases apps from the standby state

Page 16: Marshmallow 6 - files.meetup.com Marshmellow - 27-10-20… · Introduction to Marshmallow Android Marshmallow 6.0 focus is: Security - e.g Runtime permissions, Fingerprint auth, etc

Juan Pablo Proverbiohttps://nz.linkedin.com/in/proverbio

Direct Share

Page 17: Marshmallow 6 - files.meetup.com Marshmellow - 27-10-20… · Introduction to Marshmallow Android Marshmallow 6.0 focus is: Security - e.g Runtime permissions, Fingerprint auth, etc

● Provides a direct way of sharing content with your contacts no matter which app they are from

● Improves the share user experience providing a better integration across different apps

● It allows the user to share content directly into another app

● It’s a service that extends ChooserTargetService

Direct Share

Page 19: Marshmallow 6 - files.meetup.com Marshmellow - 27-10-20… · Introduction to Marshmallow Android Marshmallow 6.0 focus is: Security - e.g Runtime permissions, Fingerprint auth, etc

Fingerprint Authentication

Juan Pablo Proverbiohttps://nz.linkedin.com/in/proverbio

Page 20: Marshmallow 6 - files.meetup.com Marshmellow - 27-10-20… · Introduction to Marshmallow Android Marshmallow 6.0 focus is: Security - e.g Runtime permissions, Fingerprint auth, etc

● Now apps can access the fingerprint hardware. You can also implement your own UI, but you should use the standard fingerprint icon

● Provides a better User Experience because it doesn’t require the user to remember and enter a password or pin

● It’s a good option for signing in, completion of a sensitive operation like buy an item or settings changes, etc.

● The related permission is<uses-permission android:name="android.permission.USE_FINGERPRINT" />

Fingerprint Authentication

Page 21: Marshmallow 6 - files.meetup.com Marshmellow - 27-10-20… · Introduction to Marshmallow Android Marshmallow 6.0 focus is: Security - e.g Runtime permissions, Fingerprint auth, etc

Fingerprint Authentication SampleDownload Application from Android Developer website

Page 22: Marshmallow 6 - files.meetup.com Marshmellow - 27-10-20… · Introduction to Marshmallow Android Marshmallow 6.0 focus is: Security - e.g Runtime permissions, Fingerprint auth, etc

Juan Pablo Proverbiohttps://nz.linkedin.com/in/proverbio

Auto Backup for Apps

Page 23: Marshmallow 6 - files.meetup.com Marshmellow - 27-10-20… · Introduction to Marshmallow Android Marshmallow 6.0 focus is: Security - e.g Runtime permissions, Fingerprint auth, etc

Auto Backup for Apps

● The system now performs automatic full data backup and restore for apps

● Your app must target API level 23 to enable this feature

● Auto data backup allows to save user data even when the app is uninstalled from a device

● Enhances User Experience across different devices

● To disable auto backup you should define in the application tag android:allowBackup="false"

● Through a xml configuration file you can define what to include and exclude. Use in the application tag android:fullBackupContent="@xml/mybackupscheme"

<full-backup-content>

<include domain=["file" | "database" | "sharedpref" | "external" |

"root"]

path="string" />

<exclude domain=["file" | "database" | "sharedpref" | "external" |

"root"]

path="string" />

</full-backup-content>

● In earlier Android versions you are still able to provide and use your BackupAgent

Page 24: Marshmallow 6 - files.meetup.com Marshmellow - 27-10-20… · Introduction to Marshmallow Android Marshmallow 6.0 focus is: Security - e.g Runtime permissions, Fingerprint auth, etc

Juan Pablo Proverbiohttps://nz.linkedin.com/in/proverbio

Voice Interactions throughGoogle Now

Page 25: Marshmallow 6 - files.meetup.com Marshmellow - 27-10-20… · Introduction to Marshmallow Android Marshmallow 6.0 focus is: Security - e.g Runtime permissions, Fingerprint auth, etc

Voice Integration through Google Now

● One API, many devices. Implement once run everywhere.

● Let Google know what your app can do

● Engage with your audience from a more fun way

● Allows you to build conversational voice experiences into your apps

Page 26: Marshmallow 6 - files.meetup.com Marshmellow - 27-10-20… · Introduction to Marshmallow Android Marshmallow 6.0 focus is: Security - e.g Runtime permissions, Fingerprint auth, etc

Juan Pablo Proverbiohttps://nz.linkedin.com/in/proverbio

How to update to Marshmellow?

Page 27: Marshmallow 6 - files.meetup.com Marshmellow - 27-10-20… · Introduction to Marshmallow Android Marshmallow 6.0 focus is: Security - e.g Runtime permissions, Fingerprint auth, etc

How to update to Marshmallow?

● Download the latest Android Studio

● Update your targetSdkVersion to "23" in your module build.gradle

● Update your buildToolsVersion to "23.0.1" in your module build.gradle

● Update your support libraries to vX:23.+ compile 'com.android.support:support-v4:23.+'

compile 'com.android.support:appcompat-v7:23.+'

compile "com.android.support:support-v13:23.+"

● Ready to go!

Page 28: Marshmallow 6 - files.meetup.com Marshmellow - 27-10-20… · Introduction to Marshmallow Android Marshmallow 6.0 focus is: Security - e.g Runtime permissions, Fingerprint auth, etc

Questions?

Juan Pablo Proverbiohttps://nz.linkedin.com/in/proverbio

Page 29: Marshmallow 6 - files.meetup.com Marshmellow - 27-10-20… · Introduction to Marshmallow Android Marshmallow 6.0 focus is: Security - e.g Runtime permissions, Fingerprint auth, etc

Documentation Links

● Android 6.0 APIs● Android 6.0 Changes● Optimizing for Doze and App Standby● Doze and Standby modes● Auto Backup for Apps● Implement Voice Interactions● Permission Request Patterns● Get started● Samples

Page 30: Marshmallow 6 - files.meetup.com Marshmellow - 27-10-20… · Introduction to Marshmallow Android Marshmallow 6.0 focus is: Security - e.g Runtime permissions, Fingerprint auth, etc

Thank you!

Juan Pablo Proverbiohttps://nz.linkedin.com/in/proverbio