27
What’s new in Android M? Top 10 things you should know

What's new in android M(6.0)

Embed Size (px)

Citation preview

Page 1: What's new in android M(6.0)

What’s new in Android M?

Top 10 things you should know

Page 2: What's new in android M(6.0)

M - preview timeline

● Schedule subject to change● Updates delivered over-the-air (OTA)● Final M release targeting Q3 2015 (new Nexus 5?)

Page 3: What's new in android M(6.0)

App permissions● NORMAL Permission vs Not :)● Changes to runtime permission● Reduced install and update

friction.● Behavior remains same for prev

versions of SDK○ grant upfront○ but can deny later

● Best practice : for absolutely necessary permission ask user for it during setup

Page 4: What's new in android M(6.0)

App permissionstargetSdkVersion < M targetSdkVersion = M+

Pre-M device Install time permission dialog All permissions granted

M deviceInstall time permission dialog All permissions

grantedUser can revoke

permissions

No dialog during installNo permissions granted initially App can request

permissions User can revoke permissions

Page 5: What's new in android M(6.0)

How to request permissions

Page 6: What's new in android M(6.0)

And take care of the answer

Page 7: What's new in android M(6.0)

Fingerprint API● New fingerprint api● Hardware support● Updated lockscreen● Multi finger support● UI is completely controlled by the app● Can fall back to keyguard manager● Authenticate user without sharing any credential

Page 8: What's new in android M(6.0)

Doze Mode

Page 9: What's new in android M(6.0)

Doze Mode● Better battery back up when idle● Standby can improve upto 2x● Uses sensors to detect if the phone is idle● Postpones non important tasks that wake up the device● Resumes when the device is moves

Page 10: What's new in android M(6.0)

Doze Mode - What does it mean?

Network access is disabled, unless your app receives a high priority Google Cloud Messaging tickle.

Wake locks are ignored.Alarms scheduled with the AlarmManager class are disabled,

except for alarms that you've set with the setAlarmClock() method and AlarmManager.setAndAllowWhileIdle().

WiFi scans are not performed.Syncs and jobs for your sync adapters and JobScheduler are

not permitted to run.

Page 11: What's new in android M(6.0)

App Standby● Apps that are not used for long

periods● Lose access to network and

background tasks● Avoid continuous battery drain for

unused stuff● Resumes when the device plugs in

or you use the app .

Page 12: What's new in android M(6.0)

Assistant support● Provide system additional info about the current screen

○ Context○ Metadata

● can be at application or activity level .● Google Now on TAP

Page 13: What's new in android M(6.0)

Data binding● Support library back to 2.1● view to object mapping● can apply transformation● better performance

Page 14: What's new in android M(6.0)

activity_main.xml

Page 15: What's new in android M(6.0)

User.java

Page 16: What's new in android M(6.0)

MainActivity.java

Page 17: What's new in android M(6.0)

Material design support library● Super useful● Lots of boilerplate code removed; no need to add multiple

libraries● Add to project

compile 'com.android.support:design:22.2.0'

● Navigation view , Floating Labels, SnackBar, Tabs , CoordinatorLayout , FAB

● check out coordinator layout animations on scroll

Page 18: What's new in android M(6.0)

Navigation Drawer

Page 19: What's new in android M(6.0)

Floating labels

Page 20: What's new in android M(6.0)

FAB

Page 21: What's new in android M(6.0)

Snackbar

Page 22: What's new in android M(6.0)

Tabs

Page 23: What's new in android M(6.0)

CoordinatorLayout

Page 24: What's new in android M(6.0)

ApplinksDirectly open links in app without intent chooser● Create http://<domain>:<optional port>/.well-known/statements.json:

[{ "relation": ["delegate_permission/common.handle_all_urls"], "target": { "namespace": "android_app", "package_name": "<package name>", "sha256_cert_fingerprints": ["6C:EC:C5:0E:34:AE....EB:0C:9B"] }}]

● Request app link verification<activity ...> <intent-filter android:autoVerify="true"> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="http" android:host="www.android.com" /> <data android:scheme="https" android:host="www.android.com" /> </intent-filter></activity>

Page 25: What's new in android M(6.0)

Applinks● Request app link verification

<activity ...> <intent-filter android:autoVerify="true"> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="http" android:host="www.gett.com" /> <data android:scheme="https" android:host="www.gett.com" /> </intent-filter></activity>

Page 26: What's new in android M(6.0)

Direct Share

Page 27: What's new in android M(6.0)

[email protected]+972503456408

facebook.com/levin.yonatan