SlideShare une entreprise Scribd logo
1  sur  49
Télécharger pour lire hors ligne
Hassan Abid
Google Developers Expert - Android
Singapore
What’s new in Android Pie
Introduction
● Twitter : hassanabidpk
● Facebook : https://www.facebook.com/hassanabidpk89
● Google Developers Expert - Android since March 2016
● Working at Live Streaming Platform Startup in SIngapore
(BeLive.sg)
● Worked in Seoul (South Korea) for over 5 years (Video Streaming
SDK, Video Editing app)
Get App at http://belive.sg/
Features 1/2
● Indoor Positioning with Wi-Fi RTT
● Display Cutout
● Notifications
● Multi-camera support
● ImageDecoder for drawables and bitmaps
● Animations
Features 2/2
● HDR VP9 Video, HEIF Image Compression
● JobSchedular
● Neural Networks API 1.1
● Accessibility
● Rotation
● Text
Biggest Change??
Adaptive Battery (Read more here)
Indoor Positioning with Wi-Fi RTT
● Use Wi-Fi RTT (Round-Trip-Time) API to measure the distance to
nearby RTT-capable Wi-FI AP (also Wi-Fi Aware devices)
Requirements
● Device Must have 802.11 mcc FTM standard
● Device Must be running Android 9
● Location and Wi-Fi scanning enabled
● Must have ACCESS_FINE_LOCATION permission
● Access-Point must have IEEE 802.11mc
Advantages of Indoor Positioning
● Indoor Navigation
● Disambiguated Voice Control
● Location-based Information
● Accuracy of 1-2 meters
Developer guide here
Indoor Positioning RTT API
API Name API Level Remarks
RTT Package [doc]
WifiRttManager
28 Full support
Display Cutout
● Support latest edge-to-edge screens
● Test using Android Device or Emulator
running Android 9
● DisplayCutout class added
○ getDisplayCutout()
Display cutout (ref : link)
Display Cutout
● New Window layout attribute
layoutInDisplayCutoutMode added
<style name="ActivityTheme">
<item name="android:windowLayoutInDisplayCutoutMode">
shortEdges <!-- default, shortEdges, never -->
</item>
</style>
LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGE
S
LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER
Best Practices
● Don't let the cutout area obscure any important text, controls,
or other information
● Avoid hard-coding the status bar height (use
WindowInsetsCompat)
● Use shortEdges or never cutout modes if your app needs to
transition into and out of fullscreen mode
● See more on Android Developers site
DisplayCutout API
API Name API Level Remarks
DisplayCutout[doc] 28 Full support
DispalyCutoutCompat[doc] Other API Levels with
androidx support library
androidx.core:core:1.0.0
Full Support
Notifications
● Starting in Android 7.0 (API level 24), you could add an
action to reply to messages
● Support for images in Android 9
● Save replies as drafts
● SmartReply
● Identify a group conversation
Notifications
// Create new Person.
val sender = Person()
.setName(name)
.setUri(uri)
.setIcon(null)
.build()
// Create image message.
val message = Message("Picture", time, sender)
.setData("image/", imageUri)
val style = Notification.MessagingStyle(getUser())
.addMessage("Check this out!", 0, sender)
.addMessage(message)
Notifications
● Android 8.0 introduced Notification Channels
● Blocking channel groups
● New broadcast intent types
○ The Android system now sends broadcast intents when the blocking
state of notification channels and channel groups’ changes
Notification API
API Name API Level Remarks
Person[doc] 28 Use with targetSDKVersion
28
Notification.MessagingStyle (Person user) 28 Other constructors are
deprecated
addMessage (CharSequence text, long
timestamp, Person sender)
28 Person Should be null for
messages by the current
use
Multi-Camera support
● On devices running Android 9, you can access streams
simultaneously from two or more physical cameras.
● Support for external USB/UVC cameras on supported
devices
● Improvements in Session Parameters to reduce delays
ImageDecoder class
● With new ImageDecoder class
○ BitmapFactory
○ BitmapFactory.Options
● Create a Drawable or Bitmap from a byte buffer, file or a
URI
● Decode using decodeDrawable() or decodeBitmap()
● Resizing, Crop, mutable bitmap APIs also available
ImageDecoder class
A class for converting encoded images (like PNG, JPEG,
WEBP, GIF, or HEIF) into Drawable or Bitmap objects.
// Step - 1 : Create a Source
// Step - 2 : Decode source
File file = new File(...);
ImageDecoder.Source source = ImageDecoder.createSource(file);
Drawable drawable = ImageDecoder.decodeDrawable(source);
ImageDecoder - Change settings
// To Change default settings pass OnHeaderDecoderListener in addition to source
// Following code shows sample image with half the width and height
OnHeaderDecodedListener listener = new OnHeaderDecodedListener() {
public void onHeaderDecoded(ImageDecoder decoder, ImageInfo info,
Source source) {
decoder.setTargetSampleSize(2);
}
};
Drawable drawable = ImageDecoder.decodeDrawable(source, listener);
ImageDecoder - GIF and WEBP
@Throws(IOException::class)
private fun decodeImage() {
val decodedAnimation = ImageDecoder.decodeDrawable(
ImageDecoder.createSource(resources, R.drawable.my_drawable))
// Prior to start(), the first frame is displayed.
(decodedAnimation as? AnimatedImageDrawable)?.start()
}
ImageDecoder - Customization
// Rounded corners
Drawable drawable = ImageDecoder.decodeDrawable(source, (decoder, info, src) -> {
decoder.setPostProcessor((canvas) -> {
Path path = new Path();
path.setFillType(Path.FillType.INVERSE_EVEN_ODD);
int width = canvas.getWidth();
int height = canvas.getHeight();
path.addRoundRect(0, 0, width, height, 20, 20, Path.Direction.CW);
Paint paint = new Paint();
paint.setAntiAlias(true);
paint.setColor(Color.TRANSPARENT);
paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC));
canvas.drawPath(path, paint);
return PixelFormat.TRANSLUCENT;
});
});
ImageDecoder
API Name API Level Remarks
ImageDecoder[doc] 28 Full support (Should use
targetSDK 28)
HDR VP9 video, HEIF Image
● Android 9 provides support for
HDR VP9 Video Profile 2
● Support for HEIF Image
● You can do a jpeg-to-heic
conversion using ImageDecoder
or BitmapFactory
Data cost sensitivity in JobScheduler
● JobScheduler is Android's central service to help you manage
scheduled tasks or work across Doze, App Standby, and
Background Limits
● In Android 9.0, Jobs can declare data size, signal prefetching
and specify network requirements
○ Provided by carrier
Neural Network API 1.1.1
● The Neural Networks API was introduced in Android 8.1
(API level 27)
● In Android 9.0, nine new APIS are added
Rotation (Behavior)
Text
● Precomputed Text
● Magnifier
● Smart linkify (TextClassifier)
● TextLayout
● Read more in this blog post
PreComputed Text
API Name API Level Remarks
PrecomputedText [doc] 28 Full Support
PrecomputedTextCompat[doc] 21-27 Use internal Text layout
cache
PrecomputedTextCompat 14 - 20 Does Nothing
Magnifier
API Name API Level Remarks
Magnifier [doc] 28 Only API Level 28 and high
TextClassifier (Smart Linkify)
API Name API Level Remarks
TextClassifier[doc] 26+ Full Support
TextView (Text Layout)
API Name API Level Remarks
TextView [doc] Target SDK : 28 New APIS : lineHeight,
firstBaselineToTopHeight,
lastBaselineToBottomHeigh
t
Slices
● Slices are UI templates that can display rich, dynamic, and
interactive content from your app from within the Google Search
app and the Google Assistant
● Developer Guide
New System Navigation
Security
● Apps no longer need to build
their own dialog--instead they
use the BiometricPrompt API to
show the standard system
dialog
● HTTPS by default
App Actions
● Developers Preview coming soon
Migrating App to Android 9.0
Checking compatibility and updating targetSdkVersion
Compatibility with
Android 9
Summary
Summary
● Android Pie SDK is now more Kotlin friendly
● Display Cutout
● Notifications
● TextClassifier enhancements using Machine Learning
● Slices
● ImageDecoder
● New System Navigation
● Etc.
Appendix
https://android-developers.googleblog.com/2018/08/introducing-android-9-pie.html
https://developer.android.com/about/versions/pie/android-9.0
https://developer.android.com/about/versions/pie/android-9.0-migration#bfa
https://medium.com/exploring-android/exploring-android-p-display-cutouts-42885e8a2a96
https://developer.android.com/guide/actions/
https://developer.android.com/guide/slices/
Thank You

Contenu connexe

Tendances (20)

android phone feature and value for user
android phone feature and value for userandroid phone feature and value for user
android phone feature and value for user
 
Android PPT
Android PPTAndroid PPT
Android PPT
 
Android 10 released check out new features
Android 10 released  check out new featuresAndroid 10 released  check out new features
Android 10 released check out new features
 
Android ppt
Android pptAndroid ppt
Android ppt
 
Evolution of android operating system
Evolution of android operating systemEvolution of android operating system
Evolution of android operating system
 
Mohit Jaiswal
Mohit JaiswalMohit Jaiswal
Mohit Jaiswal
 
Android tutorial points
Android tutorial pointsAndroid tutorial points
Android tutorial points
 
Android ppt for saravanan angel
Android ppt for saravanan angelAndroid ppt for saravanan angel
Android ppt for saravanan angel
 
Android ppt
Android ppt Android ppt
Android ppt
 
Android Introduction 2013
Android Introduction 2013Android Introduction 2013
Android Introduction 2013
 
Android ppt
Android pptAndroid ppt
Android ppt
 
Android Applications
Android ApplicationsAndroid Applications
Android Applications
 
Android Programming Seminar
Android Programming SeminarAndroid Programming Seminar
Android Programming Seminar
 
Android
AndroidAndroid
Android
 
Android OS
Android OSAndroid OS
Android OS
 
Android OS by Prasad & Sarang
Android OS by Prasad & SarangAndroid OS by Prasad & Sarang
Android OS by Prasad & Sarang
 
Android OS and its Features
Android OS and its FeaturesAndroid OS and its Features
Android OS and its Features
 
Introduction to Android - Seminar
Introduction to Android - SeminarIntroduction to Android - Seminar
Introduction to Android - Seminar
 
Android technology
Android technology Android technology
Android technology
 
Introduction to Android
Introduction to Android Introduction to Android
Introduction to Android
 

Similaire à What's new in Android Pie

Google I/O 2019 - what's new in Android Q and Jetpack
Google I/O 2019 - what's new in Android Q and JetpackGoogle I/O 2019 - what's new in Android Q and Jetpack
Google I/O 2019 - what's new in Android Q and JetpackSunita Singh
 
What's new in android 4.4 - Romain Guy & Chet Haase
What's new in android 4.4 - Romain Guy & Chet HaaseWhat's new in android 4.4 - Romain Guy & Chet Haase
What's new in android 4.4 - Romain Guy & Chet HaaseParis Android User Group
 
What's new in Android - Google I/O Extended Bangkok 2022
What's new in Android - Google I/O Extended Bangkok 2022What's new in Android - Google I/O Extended Bangkok 2022
What's new in Android - Google I/O Extended Bangkok 2022Somkiat Khitwongwattana
 
android_project
android_projectandroid_project
android_projectAdit Ghosh
 
Android Development - Process & Tools
Android Development - Process & ToolsAndroid Development - Process & Tools
Android Development - Process & ToolsLope Emano
 
Android Lollipop: The developer's perspective
Android Lollipop: The developer's perspectiveAndroid Lollipop: The developer's perspective
Android Lollipop: The developer's perspectiveSebastian Vieira
 
Introduction to Cloud Computing with Google Cloud
Introduction to Cloud Computing with Google CloudIntroduction to Cloud Computing with Google Cloud
Introduction to Cloud Computing with Google Cloudwesley chun
 
Android dev o_auth
Android dev o_authAndroid dev o_auth
Android dev o_authlzongren
 
Rhomobile 5.5 Release Notes
Rhomobile 5.5 Release NotesRhomobile 5.5 Release Notes
Rhomobile 5.5 Release NotesKonstantin Rybas
 
Android workshop material
Android workshop materialAndroid workshop material
Android workshop materialReza Yogaswara
 
Rapid and Reliable Developing with HTML5 & GWT
Rapid and Reliable Developing with HTML5 & GWTRapid and Reliable Developing with HTML5 & GWT
Rapid and Reliable Developing with HTML5 & GWTManuel Carrasco Moñino
 
Android task manager project presentation
Android task manager project presentationAndroid task manager project presentation
Android task manager project presentationAkhilesh Jaiswal
 
Introduction to Gradio library in python.pptx
Introduction to Gradio library in python.pptxIntroduction to Gradio library in python.pptx
Introduction to Gradio library in python.pptxvahid67ebrahimian
 
Serverless Computing with Google Cloud
Serverless Computing with Google CloudServerless Computing with Google Cloud
Serverless Computing with Google Cloudwesley chun
 
Intro to Flutter SDK
Intro to Flutter SDKIntro to Flutter SDK
Intro to Flutter SDKdigitaljoni
 
Android Applications Development: A Quick Start Guide
Android Applications Development: A Quick Start GuideAndroid Applications Development: A Quick Start Guide
Android Applications Development: A Quick Start GuideSergii Zhuk
 
Using the Presentation API and external screens on Android
Using the Presentation API and external screens on AndroidUsing the Presentation API and external screens on Android
Using the Presentation API and external screens on AndroidXavier Hallade
 
[Android Codefest] Using the Second-Screen API & Intel® Wireless Display From...
[Android Codefest] Using the Second-Screen API & Intel® Wireless Display From...[Android Codefest] Using the Second-Screen API & Intel® Wireless Display From...
[Android Codefest] Using the Second-Screen API & Intel® Wireless Display From...BeMyApp
 
[Nuxeo World 2013] Roadmap 2014 - Technical Part
[Nuxeo World 2013] Roadmap 2014 - Technical Part [Nuxeo World 2013] Roadmap 2014 - Technical Part
[Nuxeo World 2013] Roadmap 2014 - Technical Part Nuxeo
 

Similaire à What's new in Android Pie (20)

Google I/O 2019 - what's new in Android Q and Jetpack
Google I/O 2019 - what's new in Android Q and JetpackGoogle I/O 2019 - what's new in Android Q and Jetpack
Google I/O 2019 - what's new in Android Q and Jetpack
 
What's new in android 4.4 - Romain Guy & Chet Haase
What's new in android 4.4 - Romain Guy & Chet HaaseWhat's new in android 4.4 - Romain Guy & Chet Haase
What's new in android 4.4 - Romain Guy & Chet Haase
 
What's new in Android - Google I/O Extended Bangkok 2022
What's new in Android - Google I/O Extended Bangkok 2022What's new in Android - Google I/O Extended Bangkok 2022
What's new in Android - Google I/O Extended Bangkok 2022
 
android_project
android_projectandroid_project
android_project
 
Android Development - Process & Tools
Android Development - Process & ToolsAndroid Development - Process & Tools
Android Development - Process & Tools
 
Android Lollipop: The developer's perspective
Android Lollipop: The developer's perspectiveAndroid Lollipop: The developer's perspective
Android Lollipop: The developer's perspective
 
Introduction to Cloud Computing with Google Cloud
Introduction to Cloud Computing with Google CloudIntroduction to Cloud Computing with Google Cloud
Introduction to Cloud Computing with Google Cloud
 
Android dev o_auth
Android dev o_authAndroid dev o_auth
Android dev o_auth
 
Rhomobile 5.5 Release Notes
Rhomobile 5.5 Release NotesRhomobile 5.5 Release Notes
Rhomobile 5.5 Release Notes
 
Android workshop material
Android workshop materialAndroid workshop material
Android workshop material
 
Rapid and Reliable Developing with HTML5 & GWT
Rapid and Reliable Developing with HTML5 & GWTRapid and Reliable Developing with HTML5 & GWT
Rapid and Reliable Developing with HTML5 & GWT
 
Android task manager project presentation
Android task manager project presentationAndroid task manager project presentation
Android task manager project presentation
 
Introduction to Gradio library in python.pptx
Introduction to Gradio library in python.pptxIntroduction to Gradio library in python.pptx
Introduction to Gradio library in python.pptx
 
Serverless Computing with Google Cloud
Serverless Computing with Google CloudServerless Computing with Google Cloud
Serverless Computing with Google Cloud
 
Intro to Flutter SDK
Intro to Flutter SDKIntro to Flutter SDK
Intro to Flutter SDK
 
Visage fx
Visage fxVisage fx
Visage fx
 
Android Applications Development: A Quick Start Guide
Android Applications Development: A Quick Start GuideAndroid Applications Development: A Quick Start Guide
Android Applications Development: A Quick Start Guide
 
Using the Presentation API and external screens on Android
Using the Presentation API and external screens on AndroidUsing the Presentation API and external screens on Android
Using the Presentation API and external screens on Android
 
[Android Codefest] Using the Second-Screen API & Intel® Wireless Display From...
[Android Codefest] Using the Second-Screen API & Intel® Wireless Display From...[Android Codefest] Using the Second-Screen API & Intel® Wireless Display From...
[Android Codefest] Using the Second-Screen API & Intel® Wireless Display From...
 
[Nuxeo World 2013] Roadmap 2014 - Technical Part
[Nuxeo World 2013] Roadmap 2014 - Technical Part [Nuxeo World 2013] Roadmap 2014 - Technical Part
[Nuxeo World 2013] Roadmap 2014 - Technical Part
 

Plus de Hassan Abid

Improving app performance with Kotlin Coroutines
Improving app performance with Kotlin CoroutinesImproving app performance with Kotlin Coroutines
Improving app performance with Kotlin CoroutinesHassan Abid
 
Android 101 - Kotlin ( Future of Android Development)
Android 101 - Kotlin ( Future of Android Development)Android 101 - Kotlin ( Future of Android Development)
Android 101 - Kotlin ( Future of Android Development)Hassan Abid
 
Exploring CameraX from JetPack
Exploring CameraX from JetPackExploring CameraX from JetPack
Exploring CameraX from JetPackHassan Abid
 
What’s new in Android JetPack
What’s new in Android JetPackWhat’s new in Android JetPack
What’s new in Android JetPackHassan Abid
 
Kotlin for Android Developers
Kotlin for Android DevelopersKotlin for Android Developers
Kotlin for Android DevelopersHassan Abid
 
Building Modern Apps using Android Architecture Components
Building Modern Apps using Android Architecture ComponentsBuilding Modern Apps using Android Architecture Components
Building Modern Apps using Android Architecture ComponentsHassan Abid
 
Recap of Android Dev Summit 2018
Recap of Android Dev Summit 2018Recap of Android Dev Summit 2018
Recap of Android Dev Summit 2018Hassan Abid
 
Android Jetpack - Google IO Extended Singapore 2018
Android Jetpack - Google IO Extended Singapore 2018Android Jetpack - Google IO Extended Singapore 2018
Android Jetpack - Google IO Extended Singapore 2018Hassan Abid
 
Django for mobile applications
Django for mobile applicationsDjango for mobile applications
Django for mobile applicationsHassan Abid
 
VR Video Apps on Daydream
VR Video Apps on DaydreamVR Video Apps on Daydream
VR Video Apps on DaydreamHassan Abid
 
Best Practices in Media Playback
Best Practices in Media PlaybackBest Practices in Media Playback
Best Practices in Media PlaybackHassan Abid
 
ExoPlayer for Application developers
ExoPlayer for Application developersExoPlayer for Application developers
ExoPlayer for Application developersHassan Abid
 
Android n preview
Android n previewAndroid n preview
Android n previewHassan Abid
 
Introduction to Pakistan
Introduction to PakistanIntroduction to Pakistan
Introduction to PakistanHassan Abid
 

Plus de Hassan Abid (14)

Improving app performance with Kotlin Coroutines
Improving app performance with Kotlin CoroutinesImproving app performance with Kotlin Coroutines
Improving app performance with Kotlin Coroutines
 
Android 101 - Kotlin ( Future of Android Development)
Android 101 - Kotlin ( Future of Android Development)Android 101 - Kotlin ( Future of Android Development)
Android 101 - Kotlin ( Future of Android Development)
 
Exploring CameraX from JetPack
Exploring CameraX from JetPackExploring CameraX from JetPack
Exploring CameraX from JetPack
 
What’s new in Android JetPack
What’s new in Android JetPackWhat’s new in Android JetPack
What’s new in Android JetPack
 
Kotlin for Android Developers
Kotlin for Android DevelopersKotlin for Android Developers
Kotlin for Android Developers
 
Building Modern Apps using Android Architecture Components
Building Modern Apps using Android Architecture ComponentsBuilding Modern Apps using Android Architecture Components
Building Modern Apps using Android Architecture Components
 
Recap of Android Dev Summit 2018
Recap of Android Dev Summit 2018Recap of Android Dev Summit 2018
Recap of Android Dev Summit 2018
 
Android Jetpack - Google IO Extended Singapore 2018
Android Jetpack - Google IO Extended Singapore 2018Android Jetpack - Google IO Extended Singapore 2018
Android Jetpack - Google IO Extended Singapore 2018
 
Django for mobile applications
Django for mobile applicationsDjango for mobile applications
Django for mobile applications
 
VR Video Apps on Daydream
VR Video Apps on DaydreamVR Video Apps on Daydream
VR Video Apps on Daydream
 
Best Practices in Media Playback
Best Practices in Media PlaybackBest Practices in Media Playback
Best Practices in Media Playback
 
ExoPlayer for Application developers
ExoPlayer for Application developersExoPlayer for Application developers
ExoPlayer for Application developers
 
Android n preview
Android n previewAndroid n preview
Android n preview
 
Introduction to Pakistan
Introduction to PakistanIntroduction to Pakistan
Introduction to Pakistan
 

Dernier

VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfproinshot.com
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024Mind IT Systems
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...software pro Development
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...kalichargn70th171
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfryanfarris8
 
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
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 

Dernier (20)

VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.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
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 

What's new in Android Pie

  • 1.
  • 2. Hassan Abid Google Developers Expert - Android Singapore What’s new in Android Pie
  • 3. Introduction ● Twitter : hassanabidpk ● Facebook : https://www.facebook.com/hassanabidpk89 ● Google Developers Expert - Android since March 2016 ● Working at Live Streaming Platform Startup in SIngapore (BeLive.sg) ● Worked in Seoul (South Korea) for over 5 years (Video Streaming SDK, Video Editing app)
  • 4. Get App at http://belive.sg/
  • 5.
  • 6. Features 1/2 ● Indoor Positioning with Wi-Fi RTT ● Display Cutout ● Notifications ● Multi-camera support ● ImageDecoder for drawables and bitmaps ● Animations
  • 7. Features 2/2 ● HDR VP9 Video, HEIF Image Compression ● JobSchedular ● Neural Networks API 1.1 ● Accessibility ● Rotation ● Text
  • 9. Indoor Positioning with Wi-Fi RTT ● Use Wi-Fi RTT (Round-Trip-Time) API to measure the distance to nearby RTT-capable Wi-FI AP (also Wi-Fi Aware devices) Requirements ● Device Must have 802.11 mcc FTM standard ● Device Must be running Android 9 ● Location and Wi-Fi scanning enabled ● Must have ACCESS_FINE_LOCATION permission ● Access-Point must have IEEE 802.11mc
  • 10. Advantages of Indoor Positioning ● Indoor Navigation ● Disambiguated Voice Control ● Location-based Information ● Accuracy of 1-2 meters Developer guide here
  • 11. Indoor Positioning RTT API API Name API Level Remarks RTT Package [doc] WifiRttManager 28 Full support
  • 12. Display Cutout ● Support latest edge-to-edge screens ● Test using Android Device or Emulator running Android 9 ● DisplayCutout class added ○ getDisplayCutout()
  • 14. Display Cutout ● New Window layout attribute layoutInDisplayCutoutMode added <style name="ActivityTheme"> <item name="android:windowLayoutInDisplayCutoutMode"> shortEdges <!-- default, shortEdges, never --> </item> </style>
  • 17. Best Practices ● Don't let the cutout area obscure any important text, controls, or other information ● Avoid hard-coding the status bar height (use WindowInsetsCompat) ● Use shortEdges or never cutout modes if your app needs to transition into and out of fullscreen mode ● See more on Android Developers site
  • 18. DisplayCutout API API Name API Level Remarks DisplayCutout[doc] 28 Full support DispalyCutoutCompat[doc] Other API Levels with androidx support library androidx.core:core:1.0.0 Full Support
  • 19. Notifications ● Starting in Android 7.0 (API level 24), you could add an action to reply to messages ● Support for images in Android 9 ● Save replies as drafts ● SmartReply ● Identify a group conversation
  • 20. Notifications // Create new Person. val sender = Person() .setName(name) .setUri(uri) .setIcon(null) .build() // Create image message. val message = Message("Picture", time, sender) .setData("image/", imageUri) val style = Notification.MessagingStyle(getUser()) .addMessage("Check this out!", 0, sender) .addMessage(message)
  • 21. Notifications ● Android 8.0 introduced Notification Channels ● Blocking channel groups ● New broadcast intent types ○ The Android system now sends broadcast intents when the blocking state of notification channels and channel groups’ changes
  • 22. Notification API API Name API Level Remarks Person[doc] 28 Use with targetSDKVersion 28 Notification.MessagingStyle (Person user) 28 Other constructors are deprecated addMessage (CharSequence text, long timestamp, Person sender) 28 Person Should be null for messages by the current use
  • 23. Multi-Camera support ● On devices running Android 9, you can access streams simultaneously from two or more physical cameras. ● Support for external USB/UVC cameras on supported devices ● Improvements in Session Parameters to reduce delays
  • 24. ImageDecoder class ● With new ImageDecoder class ○ BitmapFactory ○ BitmapFactory.Options ● Create a Drawable or Bitmap from a byte buffer, file or a URI ● Decode using decodeDrawable() or decodeBitmap() ● Resizing, Crop, mutable bitmap APIs also available
  • 25. ImageDecoder class A class for converting encoded images (like PNG, JPEG, WEBP, GIF, or HEIF) into Drawable or Bitmap objects. // Step - 1 : Create a Source // Step - 2 : Decode source File file = new File(...); ImageDecoder.Source source = ImageDecoder.createSource(file); Drawable drawable = ImageDecoder.decodeDrawable(source);
  • 26. ImageDecoder - Change settings // To Change default settings pass OnHeaderDecoderListener in addition to source // Following code shows sample image with half the width and height OnHeaderDecodedListener listener = new OnHeaderDecodedListener() { public void onHeaderDecoded(ImageDecoder decoder, ImageInfo info, Source source) { decoder.setTargetSampleSize(2); } }; Drawable drawable = ImageDecoder.decodeDrawable(source, listener);
  • 27. ImageDecoder - GIF and WEBP @Throws(IOException::class) private fun decodeImage() { val decodedAnimation = ImageDecoder.decodeDrawable( ImageDecoder.createSource(resources, R.drawable.my_drawable)) // Prior to start(), the first frame is displayed. (decodedAnimation as? AnimatedImageDrawable)?.start() }
  • 28. ImageDecoder - Customization // Rounded corners Drawable drawable = ImageDecoder.decodeDrawable(source, (decoder, info, src) -> { decoder.setPostProcessor((canvas) -> { Path path = new Path(); path.setFillType(Path.FillType.INVERSE_EVEN_ODD); int width = canvas.getWidth(); int height = canvas.getHeight(); path.addRoundRect(0, 0, width, height, 20, 20, Path.Direction.CW); Paint paint = new Paint(); paint.setAntiAlias(true); paint.setColor(Color.TRANSPARENT); paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC)); canvas.drawPath(path, paint); return PixelFormat.TRANSLUCENT; }); });
  • 29. ImageDecoder API Name API Level Remarks ImageDecoder[doc] 28 Full support (Should use targetSDK 28)
  • 30. HDR VP9 video, HEIF Image ● Android 9 provides support for HDR VP9 Video Profile 2 ● Support for HEIF Image ● You can do a jpeg-to-heic conversion using ImageDecoder or BitmapFactory
  • 31. Data cost sensitivity in JobScheduler ● JobScheduler is Android's central service to help you manage scheduled tasks or work across Doze, App Standby, and Background Limits ● In Android 9.0, Jobs can declare data size, signal prefetching and specify network requirements ○ Provided by carrier
  • 32. Neural Network API 1.1.1 ● The Neural Networks API was introduced in Android 8.1 (API level 27) ● In Android 9.0, nine new APIS are added
  • 34. Text ● Precomputed Text ● Magnifier ● Smart linkify (TextClassifier) ● TextLayout ● Read more in this blog post
  • 35. PreComputed Text API Name API Level Remarks PrecomputedText [doc] 28 Full Support PrecomputedTextCompat[doc] 21-27 Use internal Text layout cache PrecomputedTextCompat 14 - 20 Does Nothing
  • 36. Magnifier API Name API Level Remarks Magnifier [doc] 28 Only API Level 28 and high
  • 37. TextClassifier (Smart Linkify) API Name API Level Remarks TextClassifier[doc] 26+ Full Support
  • 38. TextView (Text Layout) API Name API Level Remarks TextView [doc] Target SDK : 28 New APIS : lineHeight, firstBaselineToTopHeight, lastBaselineToBottomHeigh t
  • 39. Slices ● Slices are UI templates that can display rich, dynamic, and interactive content from your app from within the Google Search app and the Google Assistant ● Developer Guide
  • 41. Security ● Apps no longer need to build their own dialog--instead they use the BiometricPrompt API to show the standard system dialog ● HTTPS by default
  • 42. App Actions ● Developers Preview coming soon
  • 43. Migrating App to Android 9.0 Checking compatibility and updating targetSdkVersion
  • 45.
  • 47. Summary ● Android Pie SDK is now more Kotlin friendly ● Display Cutout ● Notifications ● TextClassifier enhancements using Machine Learning ● Slices ● ImageDecoder ● New System Navigation ● Etc.