SlideShare una empresa de Scribd logo
1 de 33
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

Más contenido relacionado

La actualidad más candente

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 countingTSOLUTIONS
 
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 pptPolestarsolutions
 
Videoleap app for PC
Videoleap app for PCVideoleap app for PC
Videoleap app for PCafterpoker
 
ANDROID MARSHMALLOW
ANDROID MARSHMALLOWANDROID MARSHMALLOW
ANDROID MARSHMALLOWOm Prakash
 
Getting your app on Android TV
Getting your app on Android TVGetting your app on Android TV
Getting your app on Android TVXavier Hallade
 

La actualidad más candente (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
 

Destacado

Android N 7 Prominent Features
Android N 7 Prominent FeaturesAndroid N 7 Prominent Features
Android N 7 Prominent FeaturesRishabh Software
 
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 2016Dave Stokes
 
Présentation de Talend Data Preparation
Présentation de Talend Data PreparationPrésentation de Talend Data Preparation
Présentation de Talend Data PreparationJean-Michel Franco
 
Le crowdfunding rapport
Le crowdfunding   rapportLe crowdfunding   rapport
Le crowdfunding rapportChiraz 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 ServicesChristian 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 obRai 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
 
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 StructuresAmazon Web Services
 
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 MintzbergCX Pilots
 
from DATA to BENEFIT
from DATA to BENEFITfrom DATA to BENEFIT
from DATA to BENEFITCloudNSci
 
Business from Open Data
Business from Open DataBusiness from Open Data
Business from Open DataCloudNSci
 
Motivation, l'énergie de l'action
Motivation, l'énergie de l'actionMotivation, l'énergie de l'action
Motivation, l'énergie de l'actionRomain Vignes
 

Destacado (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 a 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 tutorialAbid Khan
 
Homework seriesandroidworkshop JUly 12th
Homework seriesandroidworkshop JUly 12thHomework seriesandroidworkshop JUly 12th
Homework seriesandroidworkshop JUly 12thRishi 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.pdfAbdullahMunir32
 
Android Lab Mannual 18SUITSP5.docx
Android Lab Mannual 18SUITSP5.docxAndroid Lab Mannual 18SUITSP5.docx
Android Lab Mannual 18SUITSP5.docxkarthikaparthasarath
 
Android howto hellowidget
Android howto hellowidgetAndroid howto hellowidget
Android howto hellowidgetHiron 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 2022Katy Slemon
 
Web application development process
Web application development processWeb application development process
Web application development processJohn 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_NETMihir 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 manualDnn 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.pptxConcetto Labs
 
NetWeaver Developer Studio for New-Beas
NetWeaver Developer Studio for New-BeasNetWeaver Developer Studio for New-Beas
NetWeaver Developer Studio for New-BeasChander445
 
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.1Banking at Ho Chi Minh city
 

Similar a 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
 

Último

ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 

Último (20)

ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 

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