SlideShare a Scribd company logo
Android N
Getting your app ready &
Quick Settings Implementation
Getting your app ready for Android N
 Supporting multi-window layouts
 Optimizing for battery efficiency
 Support enhanced notifications
Supporting multi-window layouts
 Decide what Activities are resizable
Supporting multi-window layouts
Supporting multi-window layouts
 Create a new refs.xml file in a new resource directory called values-sw220dp.
This qualifier will kick in if the smallest dimension is between 220dp and the
next qualifier dimension, which is 400dp.
Supporting multi-window layouts
Supporting multi-window layouts
Design for condensed sizes
 To simplify adapting your app for the various sizes of split-screen mode, it is
recommended to design for the smallest size first.
 Create a layout that works at 220dp wide or tall by condensing elements or
removing non-essential ones. The layout may be scaled upward from there.
 If you are using similar layouts for phones and tablets, resizing should switch
between them. If you are using very different layouts, avoid the phone UI
layout and adapt the tablet layout instead.
 Add a window background
Supporting multi-window layouts
Supporting multi-window layouts
 Sometimes it makes sense to open a new activity in an adjacent window,
when the user is in split-window mode. This is hinted to the system by adding
the FLAG_ACTIVITY_LAUNCH_ADJACENT flag to the Intent
Optimizing for battery efficiency
Optimizing for battery efficiency
Optimizing for battery efficiency
 For background work that isn't time critical (like checking email, or backing
up photos), migrate to the JobScheduler or GcmNetworkManager APIs.
These APIs provide greater flexibility for scheduling jobs, and ensure your
background work is handled during a maintenance window.
 For real-time notifications (like receiving an instant message), use high-
priority GCM notifications. These have the ability to immediately wake up an
app that's in a low-power state.
 For applications which can't use either of these options, whitelisting may be
an option as a last resort.
Support enhanced notifications
 Android N enhances system notifications in a few ways:
 Notification grouping is available on Phones and Tablets (not just Android
Wear).
 Notifications now support text input responses directly from the notification.
 Notification templates have been visually and operationally refreshed.
Sample Source code Link
 https://github.com/googlecodelabs/getting-ready-for-android-n
Android N: Quick Settings
Run the sample app
 You can download the sample code from GitHub
https://github.com/googlecodelabs/android-n-quick-settings/archive/master.zip
 Run and you should see the Quick Settings Demo home screen appear after a few
seconds.
 Swipe down from the top of the device screen to open the notification shade.
 Expand the shade and click Edit at the bottom right-hand corner.
 From the bottom of the Edit shade, drag the Quick Settings Sample tile to the top
part of the shade.
Update the Tile UI
 To register a Quick Settings tile and corresponding service with the Android
system, your manifest must include the service with a reference to the class
that handles the tile. It must also include the
android.permission.BIND_QUICK_SETTINGS_TILE permission and the
android.service.quicksettings.action.QS_TILE intent filter.
AndroidManifest.xml
Update the Tile UI
 Now we will interact with the tile from the TileService at runtime
 In the app/src/start/java/com.google.android_quick_settings/ directory,
open QuickSettingsService.java and replace the override for the onClick
method with the following code.
QuickSettingsService.java
Update the Tile UI
 Next, we'll add some code that updates the appearance of the tile. It gets a
reference to the tile at runtime, changes the icon and the label, and the
state of the tile based upon persisted data.
QuickSettingsService.java
Update the Tile UI
 Now we need to access and change the persisted data for the tile service. In
the following code snippet, the app gets data from SharedPreferences,
updates the setting, and then writes the updated setting back to
SharedPreferences.
QuickSettingsService.java
Update the Tile UI
 Run and you should see the Quick Settings Demo home screen appear after a
few seconds.
 Swipe down from the top of the device screen to open the notification shade.
 Tap the Quick Settings Demo tile repeatedly. You should see the tile icon,
state, and label change as you tap
Launch a dialog from a tile
 Create your own Quick Settings service that launches a dialog in response to a
tile being tapped. The setting in the Android manifest file has already been
added for you in the sample app.
QuickSettingsService.java
Launch an activity from a tile
 In this final section, you'll create another Quick Settings TileService. This
TileService class launches an activity in response to the user tapping the tile.
You might use a pattern like this when you need to take the user directly to
your app from the Quick Settings tile.
QSIntentService.java
THANKS…
?
Feel free to Contact !
I am Towhidul Haque Roni
Blog: http://towhidulhaque.blogspot.com/
http://www.somewhereinblog.net/blog/throni/
Facebook: https://www.facebook.com/throni
Twitter: https://twitter.com/throni87
LinkedIn: http://www.linkedin.com/pub/towhid ul-haque-
roni/8/a2a/8b8
E-mail: throni@gmail.com

More Related Content

What's hot

GeoVision : CCTV Solutions : GV-NVR for Object counting
GeoVision : CCTV Solutions : GV-NVR for Object countingGeoVision : CCTV Solutions : GV-NVR for Object counting
GeoVision : CCTV Solutions : GV-NVR for Object counting
TSOLUTIONS
 
Thane Brimhall So You’ve Built It… Now What?
Thane Brimhall So You’ve Built It… Now What?Thane Brimhall So You’ve Built It… Now What?
Thane Brimhall So You’ve Built It… Now What?
Amazon Web Services
 
Qlik sense february 2021 release ppt
Qlik sense february 2021 release pptQlik sense february 2021 release ppt
Qlik sense february 2021 release ppt
Polestarsolutions
 
Videoleap app for PC
Videoleap app for PCVideoleap app for PC
Videoleap app for PC
afterpoker
 
ANDROID MARSHMALLOW
ANDROID MARSHMALLOWANDROID MARSHMALLOW
ANDROID MARSHMALLOW
Om Prakash
 
Getting your app on Android TV
Getting your app on Android TVGetting your app on Android TV
Getting your app on Android TV
Xavier Hallade
 
34 viewport
34 viewport34 viewport
34 viewport
SatyakiDas12
 

What's hot (7)

GeoVision : CCTV Solutions : GV-NVR for Object counting
GeoVision : CCTV Solutions : GV-NVR for Object countingGeoVision : CCTV Solutions : GV-NVR for Object counting
GeoVision : CCTV Solutions : GV-NVR for Object counting
 
Thane Brimhall So You’ve Built It… Now What?
Thane Brimhall So You’ve Built It… Now What?Thane Brimhall So You’ve Built It… Now What?
Thane Brimhall So You’ve Built It… Now What?
 
Qlik sense february 2021 release ppt
Qlik sense february 2021 release pptQlik sense february 2021 release ppt
Qlik sense february 2021 release ppt
 
Videoleap app for PC
Videoleap app for PCVideoleap app for PC
Videoleap app for PC
 
ANDROID MARSHMALLOW
ANDROID MARSHMALLOWANDROID MARSHMALLOW
ANDROID MARSHMALLOW
 
Getting your app on Android TV
Getting your app on Android TVGetting your app on Android TV
Getting your app on Android TV
 
34 viewport
34 viewport34 viewport
34 viewport
 

Viewers also liked

Android N 7 Prominent Features
Android N 7 Prominent FeaturesAndroid N 7 Prominent Features
Android N 7 Prominent Features
Rishabh Software
 
Strands-PFM_Brochure
Strands-PFM_BrochureStrands-PFM_Brochure
Strands-PFM_Brochure
Xavier Marcillac
 
Relational Theory for Budding Einsteins -- LonestarPHP 2016
Relational Theory for Budding Einsteins -- LonestarPHP 2016Relational Theory for Budding Einsteins -- LonestarPHP 2016
Relational Theory for Budding Einsteins -- LonestarPHP 2016
Dave Stokes
 
Présentation de Talend Data Preparation
Présentation de Talend Data PreparationPrésentation de Talend Data Preparation
Présentation de Talend Data Preparation
Jean-Michel Franco
 
Le crowdfunding rapport
Le crowdfunding   rapportLe crowdfunding   rapport
Le crowdfunding rapport
Chiraz Chebbi
 
How to Meta-Sumo - Using Logs for Agile Monitoring of Production Services
How to Meta-Sumo - Using Logs for Agile Monitoring of Production ServicesHow to Meta-Sumo - Using Logs for Agile Monitoring of Production Services
How to Meta-Sumo - Using Logs for Agile Monitoring of Production Services
Christian Beedgen
 
U 1.1 ob bba-ii introduction to ob
U 1.1 ob bba-ii introduction to obU 1.1 ob bba-ii introduction to ob
U 1.1 ob bba-ii introduction to ob
Rai University
 
Institut de Gouvernance Numérique (IGN)
Institut de Gouvernance Numérique (IGN)Institut de Gouvernance Numérique (IGN)
Institut de Gouvernance Numérique (IGN)
Lydie Vieira Dos Santos
 
Plasticité des IHM
Plasticité des IHMPlasticité des IHM
Plasticité des IHM
Anne-Marie Pinna-Dery
 
Shared Responsibility and Setting Up Secure Account Structures
Shared Responsibility and Setting Up Secure Account StructuresShared Responsibility and Setting Up Secure Account Structures
Shared Responsibility and Setting Up Secure Account Structures
Amazon Web Services
 
Strategies of Fiscal Management
Strategies of Fiscal ManagementStrategies of Fiscal Management
Strategies of Fiscal Management
Doctoral Student, NCU
 
Of strategies deliberate and emergent - Henry Mintzberg
Of strategies deliberate and emergent - Henry MintzbergOf strategies deliberate and emergent - Henry Mintzberg
Of strategies deliberate and emergent - Henry Mintzberg
CX Pilots
 
from DATA to BENEFIT
from DATA to BENEFITfrom DATA to BENEFIT
from DATA to BENEFIT
CloudNSci
 
Business from Open Data
Business from Open DataBusiness from Open Data
Business from Open Data
CloudNSci
 
Podozi Pitch Deck
Podozi Pitch DeckPodozi Pitch Deck
Podozi Pitch Deck
Tech in Asia ID
 
Android vs iOS
Android vs iOSAndroid vs iOS
Android vs iOS
Manan Narang
 
merged_document
merged_documentmerged_document
merged_document
Angelica Jusino
 
Motivation, l'énergie de l'action
Motivation, l'énergie de l'actionMotivation, l'énergie de l'action
Motivation, l'énergie de l'action
Romain Vignes
 

Viewers also liked (18)

Android N 7 Prominent Features
Android N 7 Prominent FeaturesAndroid N 7 Prominent Features
Android N 7 Prominent Features
 
Strands-PFM_Brochure
Strands-PFM_BrochureStrands-PFM_Brochure
Strands-PFM_Brochure
 
Relational Theory for Budding Einsteins -- LonestarPHP 2016
Relational Theory for Budding Einsteins -- LonestarPHP 2016Relational Theory for Budding Einsteins -- LonestarPHP 2016
Relational Theory for Budding Einsteins -- LonestarPHP 2016
 
Présentation de Talend Data Preparation
Présentation de Talend Data PreparationPrésentation de Talend Data Preparation
Présentation de Talend Data Preparation
 
Le crowdfunding rapport
Le crowdfunding   rapportLe crowdfunding   rapport
Le crowdfunding rapport
 
How to Meta-Sumo - Using Logs for Agile Monitoring of Production Services
How to Meta-Sumo - Using Logs for Agile Monitoring of Production ServicesHow to Meta-Sumo - Using Logs for Agile Monitoring of Production Services
How to Meta-Sumo - Using Logs for Agile Monitoring of Production Services
 
U 1.1 ob bba-ii introduction to ob
U 1.1 ob bba-ii introduction to obU 1.1 ob bba-ii introduction to ob
U 1.1 ob bba-ii introduction to ob
 
Institut de Gouvernance Numérique (IGN)
Institut de Gouvernance Numérique (IGN)Institut de Gouvernance Numérique (IGN)
Institut de Gouvernance Numérique (IGN)
 
Plasticité des IHM
Plasticité des IHMPlasticité des IHM
Plasticité des IHM
 
Shared Responsibility and Setting Up Secure Account Structures
Shared Responsibility and Setting Up Secure Account StructuresShared Responsibility and Setting Up Secure Account Structures
Shared Responsibility and Setting Up Secure Account Structures
 
Strategies of Fiscal Management
Strategies of Fiscal ManagementStrategies of Fiscal Management
Strategies of Fiscal Management
 
Of strategies deliberate and emergent - Henry Mintzberg
Of strategies deliberate and emergent - Henry MintzbergOf strategies deliberate and emergent - Henry Mintzberg
Of strategies deliberate and emergent - Henry Mintzberg
 
from DATA to BENEFIT
from DATA to BENEFITfrom DATA to BENEFIT
from DATA to BENEFIT
 
Business from Open Data
Business from Open DataBusiness from Open Data
Business from Open Data
 
Podozi Pitch Deck
Podozi Pitch DeckPodozi Pitch Deck
Podozi Pitch Deck
 
Android vs iOS
Android vs iOSAndroid vs iOS
Android vs iOS
 
merged_document
merged_documentmerged_document
merged_document
 
Motivation, l'énergie de l'action
Motivation, l'énergie de l'actionMotivation, l'énergie de l'action
Motivation, l'énergie de l'action
 

Similar to Google I/O 2016 replay - Android N Development

An end-to-end experience of Windows Phone 7 development (Part 1)
An end-to-end experience of Windows Phone 7 development (Part 1)An end-to-end experience of Windows Phone 7 development (Part 1)
An end-to-end experience of Windows Phone 7 development (Part 1)
rudigrobler
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorial
Abid Khan
 
Homework seriesandroidworkshop JUly 12th
Homework seriesandroidworkshop JUly 12thHomework seriesandroidworkshop JUly 12th
Homework seriesandroidworkshop JUly 12th
Rishi Kumar
 
Implementation of Push Notification in React Native Android app using Firebas...
Implementation of Push Notification in React Native Android app using Firebas...Implementation of Push Notification in React Native Android app using Firebas...
Implementation of Push Notification in React Native Android app using Firebas...
naseeb20
 
Mobile Application Development -Lecture 09 & 10.pdf
Mobile Application Development -Lecture 09 & 10.pdfMobile Application Development -Lecture 09 & 10.pdf
Mobile Application Development -Lecture 09 & 10.pdf
AbdullahMunir32
 
Android Lab Mannual 18SUITSP5.docx
Android Lab Mannual 18SUITSP5.docxAndroid Lab Mannual 18SUITSP5.docx
Android Lab Mannual 18SUITSP5.docx
karthikaparthasarath
 
Android how to hellowidget
Android how to hellowidgetAndroid how to hellowidget
Android how to hellowidget
Mohammad Ali Raza Siddiqui
 
Android howto hellowidget
Android howto hellowidgetAndroid howto hellowidget
Android howto hellowidget
Hiron Das
 
The ultimate guide to optimize your react native app performance in 2022
The ultimate guide to optimize your react native app performance in 2022The ultimate guide to optimize your react native app performance in 2022
The ultimate guide to optimize your react native app performance in 2022
Katy Slemon
 
Google Android
Google AndroidGoogle Android
Google Android
Michael Angelo Rivera
 
Web application development process
Web application development processWeb application development process
Web application development process
John Smith
 
Enhance model driven embedded canvas app here is all that you need to know!
Enhance model driven embedded canvas app  here is all that you need to know!Enhance model driven embedded canvas app  here is all that you need to know!
Enhance model driven embedded canvas app here is all that you need to know!
Concetto Labs
 
Trimantra - Project Portfolio_NET
Trimantra - Project Portfolio_NETTrimantra - Project Portfolio_NET
Trimantra - Project Portfolio_NET
Mihir G.
 
Get the Jump on Mobilizing your Notes and Domino Applications Today! (JMP103...
Get the Jump on Mobilizing your Notes and Domino Applications Today!  (JMP103...Get the Jump on Mobilizing your Notes and Domino Applications Today!  (JMP103...
Get the Jump on Mobilizing your Notes and Domino Applications Today! (JMP103...
Paul Della-Nebbia
 
Dnn developer contact us user manual
Dnn developer contact us user manualDnn developer contact us user manual
Dnn developer contact us user manual
Dnn Developer
 
Overview of wrap Features in Power Apps.pptx
Overview of wrap Features in Power Apps.pptxOverview of wrap Features in Power Apps.pptx
Overview of wrap Features in Power Apps.pptx
Concetto Labs
 
Getting started with android studio
Getting started with android studioGetting started with android studio
Getting started with android studio
Reham Maher El-Safarini
 
NetWeaver Developer Studio for New-Beas
NetWeaver Developer Studio for New-BeasNetWeaver Developer Studio for New-Beas
NetWeaver Developer Studio for New-Beas
Chander445
 
IBM MobileFirst Platform v7.0 POT App Mgmt Lab v1.1
IBM MobileFirst Platform  v7.0 POT App Mgmt Lab v1.1IBM MobileFirst Platform  v7.0 POT App Mgmt Lab v1.1
IBM MobileFirst Platform v7.0 POT App Mgmt Lab v1.1
Banking at Ho Chi Minh city
 
How to build your own Android App -Step by Step Guide
How to build your own Android App -Step by Step GuideHow to build your own Android App -Step by Step Guide
How to build your own Android App -Step by Step Guide
Ace Web Academy -Career Development Center
 

Similar to Google I/O 2016 replay - Android N Development (20)

An end-to-end experience of Windows Phone 7 development (Part 1)
An end-to-end experience of Windows Phone 7 development (Part 1)An end-to-end experience of Windows Phone 7 development (Part 1)
An end-to-end experience of Windows Phone 7 development (Part 1)
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorial
 
Homework seriesandroidworkshop JUly 12th
Homework seriesandroidworkshop JUly 12thHomework seriesandroidworkshop JUly 12th
Homework seriesandroidworkshop JUly 12th
 
Implementation of Push Notification in React Native Android app using Firebas...
Implementation of Push Notification in React Native Android app using Firebas...Implementation of Push Notification in React Native Android app using Firebas...
Implementation of Push Notification in React Native Android app using Firebas...
 
Mobile Application Development -Lecture 09 & 10.pdf
Mobile Application Development -Lecture 09 & 10.pdfMobile Application Development -Lecture 09 & 10.pdf
Mobile Application Development -Lecture 09 & 10.pdf
 
Android Lab Mannual 18SUITSP5.docx
Android Lab Mannual 18SUITSP5.docxAndroid Lab Mannual 18SUITSP5.docx
Android Lab Mannual 18SUITSP5.docx
 
Android how to hellowidget
Android how to hellowidgetAndroid how to hellowidget
Android how to hellowidget
 
Android howto hellowidget
Android howto hellowidgetAndroid howto hellowidget
Android howto hellowidget
 
The ultimate guide to optimize your react native app performance in 2022
The ultimate guide to optimize your react native app performance in 2022The ultimate guide to optimize your react native app performance in 2022
The ultimate guide to optimize your react native app performance in 2022
 
Google Android
Google AndroidGoogle Android
Google Android
 
Web application development process
Web application development processWeb application development process
Web application development process
 
Enhance model driven embedded canvas app here is all that you need to know!
Enhance model driven embedded canvas app  here is all that you need to know!Enhance model driven embedded canvas app  here is all that you need to know!
Enhance model driven embedded canvas app here is all that you need to know!
 
Trimantra - Project Portfolio_NET
Trimantra - Project Portfolio_NETTrimantra - Project Portfolio_NET
Trimantra - Project Portfolio_NET
 
Get the Jump on Mobilizing your Notes and Domino Applications Today! (JMP103...
Get the Jump on Mobilizing your Notes and Domino Applications Today!  (JMP103...Get the Jump on Mobilizing your Notes and Domino Applications Today!  (JMP103...
Get the Jump on Mobilizing your Notes and Domino Applications Today! (JMP103...
 
Dnn developer contact us user manual
Dnn developer contact us user manualDnn developer contact us user manual
Dnn developer contact us user manual
 
Overview of wrap Features in Power Apps.pptx
Overview of wrap Features in Power Apps.pptxOverview of wrap Features in Power Apps.pptx
Overview of wrap Features in Power Apps.pptx
 
Getting started with android studio
Getting started with android studioGetting started with android studio
Getting started with android studio
 
NetWeaver Developer Studio for New-Beas
NetWeaver Developer Studio for New-BeasNetWeaver Developer Studio for New-Beas
NetWeaver Developer Studio for New-Beas
 
IBM MobileFirst Platform v7.0 POT App Mgmt Lab v1.1
IBM MobileFirst Platform  v7.0 POT App Mgmt Lab v1.1IBM MobileFirst Platform  v7.0 POT App Mgmt Lab v1.1
IBM MobileFirst Platform v7.0 POT App Mgmt Lab v1.1
 
How to build your own Android App -Step by Step Guide
How to build your own Android App -Step by Step GuideHow to build your own Android App -Step by Step Guide
How to build your own Android App -Step by Step Guide
 

Recently uploaded

Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
Sven Peters
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
rodomar2
 
Mobile app Development Services | Drona Infotech
Mobile app Development Services  | Drona InfotechMobile app Development Services  | Drona Infotech
Mobile app Development Services | Drona Infotech
Drona Infotech
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
Rakesh Kumar R
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
Ayan Halder
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 
Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !
Marcin Chrost
 
Modelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - AmsterdamModelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - Amsterdam
Alberto Brandolini
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
Remote DBA Services
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
Octavian Nadolu
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
mz5nrf0n
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
XfilesPro
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
SOCRadar
 
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
mz5nrf0n
 
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
dakas1
 
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
Bert Jan Schrijver
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
dakas1
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
Green Software Development
 
WWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders AustinWWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders Austin
Patrick Weigel
 

Recently uploaded (20)

Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
 
Mobile app Development Services | Drona Infotech
Mobile app Development Services  | Drona InfotechMobile app Development Services  | Drona Infotech
Mobile app Development Services | Drona Infotech
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 
Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !
 
Modelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - AmsterdamModelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - Amsterdam
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
 
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
 
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
 
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
 
WWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders AustinWWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders Austin
 

Google I/O 2016 replay - Android N Development

  • 1. Android N Getting your app ready & Quick Settings Implementation
  • 2. Getting your app ready for Android N  Supporting multi-window layouts  Optimizing for battery efficiency  Support enhanced notifications
  • 3. Supporting multi-window layouts  Decide what Activities are resizable
  • 5. Supporting multi-window layouts  Create a new refs.xml file in a new resource directory called values-sw220dp. This qualifier will kick in if the smallest dimension is between 220dp and the next qualifier dimension, which is 400dp.
  • 7. Supporting multi-window layouts Design for condensed sizes  To simplify adapting your app for the various sizes of split-screen mode, it is recommended to design for the smallest size first.  Create a layout that works at 220dp wide or tall by condensing elements or removing non-essential ones. The layout may be scaled upward from there.  If you are using similar layouts for phones and tablets, resizing should switch between them. If you are using very different layouts, avoid the phone UI layout and adapt the tablet layout instead.  Add a window background
  • 9. Supporting multi-window layouts  Sometimes it makes sense to open a new activity in an adjacent window, when the user is in split-window mode. This is hinted to the system by adding the FLAG_ACTIVITY_LAUNCH_ADJACENT flag to the Intent
  • 12. Optimizing for battery efficiency  For background work that isn't time critical (like checking email, or backing up photos), migrate to the JobScheduler or GcmNetworkManager APIs. These APIs provide greater flexibility for scheduling jobs, and ensure your background work is handled during a maintenance window.  For real-time notifications (like receiving an instant message), use high- priority GCM notifications. These have the ability to immediately wake up an app that's in a low-power state.  For applications which can't use either of these options, whitelisting may be an option as a last resort.
  • 13. Support enhanced notifications  Android N enhances system notifications in a few ways:  Notification grouping is available on Phones and Tablets (not just Android Wear).  Notifications now support text input responses directly from the notification.  Notification templates have been visually and operationally refreshed.
  • 14. Sample Source code Link  https://github.com/googlecodelabs/getting-ready-for-android-n
  • 15. Android N: Quick Settings
  • 16. Run the sample app  You can download the sample code from GitHub https://github.com/googlecodelabs/android-n-quick-settings/archive/master.zip  Run and you should see the Quick Settings Demo home screen appear after a few seconds.  Swipe down from the top of the device screen to open the notification shade.  Expand the shade and click Edit at the bottom right-hand corner.  From the bottom of the Edit shade, drag the Quick Settings Sample tile to the top part of the shade.
  • 17. Update the Tile UI  To register a Quick Settings tile and corresponding service with the Android system, your manifest must include the service with a reference to the class that handles the tile. It must also include the android.permission.BIND_QUICK_SETTINGS_TILE permission and the android.service.quicksettings.action.QS_TILE intent filter. AndroidManifest.xml
  • 18. Update the Tile UI  Now we will interact with the tile from the TileService at runtime  In the app/src/start/java/com.google.android_quick_settings/ directory, open QuickSettingsService.java and replace the override for the onClick method with the following code. QuickSettingsService.java
  • 19. Update the Tile UI  Next, we'll add some code that updates the appearance of the tile. It gets a reference to the tile at runtime, changes the icon and the label, and the state of the tile based upon persisted data. QuickSettingsService.java
  • 20.
  • 21.
  • 22. Update the Tile UI  Now we need to access and change the persisted data for the tile service. In the following code snippet, the app gets data from SharedPreferences, updates the setting, and then writes the updated setting back to SharedPreferences. QuickSettingsService.java
  • 23. Update the Tile UI  Run and you should see the Quick Settings Demo home screen appear after a few seconds.  Swipe down from the top of the device screen to open the notification shade.  Tap the Quick Settings Demo tile repeatedly. You should see the tile icon, state, and label change as you tap
  • 24.
  • 25. Launch a dialog from a tile  Create your own Quick Settings service that launches a dialog in response to a tile being tapped. The setting in the Android manifest file has already been added for you in the sample app.
  • 27.
  • 28.
  • 29. Launch an activity from a tile  In this final section, you'll create another Quick Settings TileService. This TileService class launches an activity in response to the user tapping the tile. You might use a pattern like this when you need to take the user directly to your app from the Quick Settings tile.
  • 31.
  • 33. Feel free to Contact ! I am Towhidul Haque Roni Blog: http://towhidulhaque.blogspot.com/ http://www.somewhereinblog.net/blog/throni/ Facebook: https://www.facebook.com/throni Twitter: https://twitter.com/throni87 LinkedIn: http://www.linkedin.com/pub/towhid ul-haque- roni/8/a2a/8b8 E-mail: throni@gmail.com