android m - runtime permissions | getting ready for marshmallow

19
Android Marshmallow Runtime Permissions

Upload: umair-vatao

Post on 12-Apr-2017

812 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: Android M - Runtime Permissions | Getting ready for Marshmallow

Android MarshmallowRuntime Permissions

Page 2: Android M - Runtime Permissions | Getting ready for Marshmallow

What is the difference

● Ask for permissions when application need it.

● Less install resistance.

● Better privacy control.

Page 3: Android M - Runtime Permissions | Getting ready for Marshmallow

What is the difference

● How many times you have decided to not to install an app?

Page 4: Android M - Runtime Permissions | Getting ready for Marshmallow

What is the difference

● How many time you thought you were forced to grant permissions to install an app?

Page 5: Android M - Runtime Permissions | Getting ready for Marshmallow

Difference - New install process

Page 6: Android M - Runtime Permissions | Getting ready for Marshmallow

What is the difference

● Asking permission when accessing certain feature.

Page 7: Android M - Runtime Permissions | Getting ready for Marshmallow

Difference - Privacy Control

Page 8: Android M - Runtime Permissions | Getting ready for Marshmallow

Difference - Privacy Control

Page 9: Android M - Runtime Permissions | Getting ready for Marshmallow

Backward Compatibility

● Legacy apps work as usual on Android M.● Ask for permissions at install time.● Users can still revoke the granted

permissions!● Application doesn’t get any exception (read

crash) for not having permission.● Application get null or zero records!

Page 10: Android M - Runtime Permissions | Getting ready for Marshmallow

Forward Compatibility

● Installing an application on older Android versions….

● Your application ask for permissions at install time.

● Support library takes care of API calls.● Separate xml identifier for newer permission

only available at Android M.

Page 11: Android M - Runtime Permissions | Getting ready for Marshmallow

Best Practices

● UX Best Practices.

● Development Best Practices.

Page 12: Android M - Runtime Permissions | Getting ready for Marshmallow

UX Best Practices

● Don’t ask for a lot of permissions at once.

Page 13: Android M - Runtime Permissions | Getting ready for Marshmallow

UX Best Practices

● Checkbox of Death!

● Ask - Explain - Ask

● Inform user that app can’t work!

Page 14: Android M - Runtime Permissions | Getting ready for Marshmallow

Best Practices

● UX Best Practices.

● Development Best Practices.

Page 15: Android M - Runtime Permissions | Getting ready for Marshmallow

Development Best Practices● UX best practices applies.

● Ask for permission when you are really using that feature

● Always check for permissions. Don’t assume or cache results.

● Permissions can be revoked while your background service is running.

Page 16: Android M - Runtime Permissions | Getting ready for Marshmallow

Code Samples

● https://github.com/googlesamples/android-RuntimePermissions

Page 17: Android M - Runtime Permissions | Getting ready for Marshmallow

Code Samples

Page 18: Android M - Runtime Permissions | Getting ready for Marshmallow

Code Samples