SlideShare a Scribd company logo
1 of 15
Download to read offline
View Android Development course details at
www.edureka.co/android-development-certification-course
For Queries:
Post on Twitter @edurekaIN: #askEdureka
Post on Facebook /edurekaIN
For more details please contact us:
US : 1800 275 9730 (toll free)
INDIA : +91 88808 62004
Email Us : webinars@edureka.co
Android 6.0 Marshmallow : Everything you
need to know !
Slide 2
www.edureka.co/front-end-web-development
www.edureka.co/android-development-certification-course
Objectives
At the end of this module, you will be able to :
→ Implement Data Binding
→ Understand Android Percent Layout in Android Marshmallow
→ Learn about Android M Runtime Permissions
→ Implement App Linking in Android M
→ Understand Direct Share feature in Android M
Slide 3 www.edureka.co/android-development-certification-course
Data Binding
 Data binding becomes part of the developer’s tool set in Android Marshmallow
 The Data Binding library provides a mechanism for linking the data which will be displayed
within our layouts to some kind of back-end data source
 Data Binding Library is used to write declarative layouts and minimize the glue code necessary
to bind your application logic and layouts
 To set up your application to use data binding, add data binding to the class path of your top-
level build.gradle file
Slide 4 www.edureka.co/android-development-certification-course
 Jcenter should be present in your repository list of your projects in Top Level
new_project {
repositories {
jcenter()
}
}
 In the build.gradle for the Android application sub-project we apply a build plugin
apply plugin: 'com.android.application'
apply plugin: 'com.android.databinding'
dependencies {
classpath "com.android.tools.build:gradle:1.3.0"
classpath "com.android.databinding:dataBinder:1.0-rc1"
}
Data Binding
Slide 5 www.edureka.co/android-development-certification-course
 Once the data binding is added , create a POJO for the binding.
 Update the layout file by adding some meta-data/markup
 Update the activity to declare the data binding
Demo
Data Binding
Slide 6 www.edureka.co/android-development-certification-course
Android Percent Layout
 There are problems with RelativeLayout and FrameLayout since you cannot set Child View's
dimension in percentage
 There are times where a particular layout requires us to divide space between components
proportionally, but the parent layout is not a LinearLayout
 It is not a problem anymore as in Marshmallow, Android team launched many Support Library to
help developer fighting with fragmentation. One of those is Percent Support Library which add an
capability to set RelativeLayout's and FrameLayout's dimension in %
Problem
Solution
Slide 7 www.edureka.co/android-development-certification-course
 First we need to include the percent support library in build.gradle file
compile 'com.android.support:percent:23.0.0‘
 Now you can switch to android.support.percent.PercentRelativeLayout and
android.support.percent.PercentFrameLayout
Android Percent Layout
Demo
Slide 8Slide 8Slide 8 www.edureka.co/android-development-certification-course
Runtime Permission
 Android 6.0 Marshmallow introduces one of the largest changes to the permissions model with
the addition of runtime permissions
 It replaces the existing install time permissions model when you target API 23 and the app is
running on an Android 6.0+ device
 Features :
» Ability to control when and with what context you’ll ask for permissions
» Google Play will not be required to accept a list of permissions before installing your app
» App updates will not be blocked until the user accepts the new permissions
Slide 9Slide 9Slide 9 www.edureka.co/android-development-certification-course
App Linking
 In Android M, when a user clicks on a website link , instead of asking the user to choose how to
handle the link he/she directly goes to the website's official app
 For example, if a twitter link is there in your inbox and you clicked on it, you used to get a prompt
asking if you want to open the link in your browser or within the Twitter app, which is installed on
your phone, now you will be directly re-directed to the twitter app, provided twitter app is there
on your device.
Slide 10Slide 10Slide 10 www.edureka.co/android-development-certification-course
 To enable your app to handle links, use intent filters in your app manifest to declare the URI
patterns to be handled by your app
 To enable link handling verification for your app, set the android:autoVerify attribute to true on
at least one of the web URI intent filters in your app manifest
App Linking
Slide 11Slide 11Slide 11 www.edureka.co/android-development-certification-course
 Test you App linking feature by confirming the list of associated hosts that the system should
verify for your app
 Confirm that the Digital Asset Links JSON file is properly hosted and defined by using the Digital
Asset Links API
 Testing a web URI intent
 Check the current system settings for link handling
Test App Linking
Slide 12 www.edureka.co/android-development-certification-course
Direct Share
 Direct Share is a new feature in Marshmallow that provides APIs for allowing users to share
content to other sources such as contacts and social networks
 Google calls it as a dummy messaging app
 Also allows users to share to specific targets, and demonstrates this by adding contacts
directly in the chooser dialog
 Example - if you frequently send your significant pictures via Hangouts, Android M will
recognize this habit and offer a single button to let you share directly with them
Slide 13 www.edureka.co/android-development-certification-course
 To enable Direct Share, apps need to implement a Service extending ChooserTargetService.
Override the method onGetChooserTargets() and return a list of Direct Share options
 In your AndroidManifest.xml, add a meta-data tag in your Activity that receives the Intent.
Specify android:name as android.service.chooser.chooser_target_service, and point the
android:value to the Service
Direct Share
Demo
Questions
Slide 14 www.edureka.co/android-development-certification-course
Android 6.0 Marshmallow - Everything you need to know !

More Related Content

What's hot

android-tutorial-for-beginner
android-tutorial-for-beginnerandroid-tutorial-for-beginner
android-tutorial-for-beginner
Ajailal Parackal
 
Android fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginnersAndroid fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginners
Boom Shukla
 
Android basic principles
Android basic principlesAndroid basic principles
Android basic principles
Henk Laracker
 
Android before getting started
Android before getting startedAndroid before getting started
Android before getting started
Ahsanul Karim
 

What's hot (20)

Android Programming Seminar
Android Programming SeminarAndroid Programming Seminar
Android Programming Seminar
 
android-tutorial-for-beginner
android-tutorial-for-beginnerandroid-tutorial-for-beginner
android-tutorial-for-beginner
 
Introduction to Android Programming by Dr.M.Pyingkodi-kongu engineering c...
Introduction to  Android   Programming by  Dr.M.Pyingkodi-kongu engineering c...Introduction to  Android   Programming by  Dr.M.Pyingkodi-kongu engineering c...
Introduction to Android Programming by Dr.M.Pyingkodi-kongu engineering c...
 
Android fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginnersAndroid fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginners
 
Android Studio Overview
Android Studio OverviewAndroid Studio Overview
Android Studio Overview
 
Intro To Android App Development
Intro To Android App DevelopmentIntro To Android App Development
Intro To Android App Development
 
Android Development Workshop
Android Development WorkshopAndroid Development Workshop
Android Development Workshop
 
Introduction to Android Programming
Introduction to Android ProgrammingIntroduction to Android Programming
Introduction to Android Programming
 
Android My Seminar
Android My SeminarAndroid My Seminar
Android My Seminar
 
Basic android-ppt
Basic android-pptBasic android-ppt
Basic android-ppt
 
Android Application Development
Android Application DevelopmentAndroid Application Development
Android Application Development
 
Introduction to Android programming
Introduction to Android programmingIntroduction to Android programming
Introduction to Android programming
 
Introduction to Android App Development
Introduction to Android App DevelopmentIntroduction to Android App Development
Introduction to Android App Development
 
Android basic principles
Android basic principlesAndroid basic principles
Android basic principles
 
Custom Android App Development – Web Animation India
Custom Android App Development – Web Animation IndiaCustom Android App Development – Web Animation India
Custom Android App Development – Web Animation India
 
Introduction to Android development - Presentation
Introduction to Android development - PresentationIntroduction to Android development - Presentation
Introduction to Android development - Presentation
 
Android overview
Android overviewAndroid overview
Android overview
 
Android Application Development
Android Application DevelopmentAndroid Application Development
Android Application Development
 
Android before getting started
Android before getting startedAndroid before getting started
Android before getting started
 
What’s new in aNdroid [Google I/O Extended Bangkok 2016]
What’s new in aNdroid [Google I/O Extended Bangkok 2016]What’s new in aNdroid [Google I/O Extended Bangkok 2016]
What’s new in aNdroid [Google I/O Extended Bangkok 2016]
 

Viewers also liked

Viewers also liked (19)

Android Marshmallow
Android MarshmallowAndroid Marshmallow
Android Marshmallow
 
Android 5.0, Lollipop
Android 5.0, LollipopAndroid 5.0, Lollipop
Android 5.0, Lollipop
 
Presentation on Android operating system
Presentation on Android operating systemPresentation on Android operating system
Presentation on Android operating system
 
Android ppt
Android ppt Android ppt
Android ppt
 
Introduction to the Android NDK
Introduction to the Android NDKIntroduction to the Android NDK
Introduction to the Android NDK
 
Android ndk: Entering the native world
Android ndk: Entering the native worldAndroid ndk: Entering the native world
Android ndk: Entering the native world
 
React Native Android. It's easy.
React Native Android. It's easy.React Native Android. It's easy.
React Native Android. It's easy.
 
Using the Android Native Development Kit (NDK)
Using the Android Native Development Kit (NDK)Using the Android Native Development Kit (NDK)
Using the Android Native Development Kit (NDK)
 
Making better use of the Internet
Making better use of the InternetMaking better use of the Internet
Making better use of the Internet
 
Android™組込み開発基礎コース BeagleBoard編
Android™組込み開発基礎コース BeagleBoard編Android™組込み開発基礎コース BeagleBoard編
Android™組込み開発基礎コース BeagleBoard編
 
Andriod Lollipop 5.0
Andriod Lollipop 5.0Andriod Lollipop 5.0
Andriod Lollipop 5.0
 
Creating the first app with android studio
Creating the first app with android studioCreating the first app with android studio
Creating the first app with android studio
 
Introduction to Android Studio
Introduction to Android StudioIntroduction to Android Studio
Introduction to Android Studio
 
Marshmallow Challenge
Marshmallow ChallengeMarshmallow Challenge
Marshmallow Challenge
 
Android Overview
Android OverviewAndroid Overview
Android Overview
 
Android 6.0 marshmallow
Android 6.0 marshmallowAndroid 6.0 marshmallow
Android 6.0 marshmallow
 
Android technology _seminar_ ppt
Android technology _seminar_ pptAndroid technology _seminar_ ppt
Android technology _seminar_ ppt
 
Windows 10
Windows 10Windows 10
Windows 10
 
Windows 10
Windows 10Windows 10
Windows 10
 

Similar to Android 6.0 Marshmallow - Everything you need to know !

Similar to Android 6.0 Marshmallow - Everything you need to know ! (20)

Beginning Native Android Apps
Beginning Native Android AppsBeginning Native Android Apps
Beginning Native Android Apps
 
AWS Cloud Essentials - An Overview
AWS Cloud Essentials - An OverviewAWS Cloud Essentials - An Overview
AWS Cloud Essentials - An Overview
 
Best android frameworks for app development in 2023.pdf
Best android frameworks for app development in 2023.pdfBest android frameworks for app development in 2023.pdf
Best android frameworks for app development in 2023.pdf
 
How to Build a Hybrid App: A Detailed Outline
How to Build a Hybrid App: A Detailed Outline How to Build a Hybrid App: A Detailed Outline
How to Build a Hybrid App: A Detailed Outline
 
What Is Google Cloud SQL Everything About The Cloud Platform Service.pdf
What Is Google Cloud SQL Everything About The Cloud Platform Service.pdfWhat Is Google Cloud SQL Everything About The Cloud Platform Service.pdf
What Is Google Cloud SQL Everything About The Cloud Platform Service.pdf
 
React Native Market Overview for Cross-Platform App Development.pdf
React Native Market Overview for Cross-Platform App Development.pdfReact Native Market Overview for Cross-Platform App Development.pdf
React Native Market Overview for Cross-Platform App Development.pdf
 
Feide Connect TNC2014
Feide Connect TNC2014Feide Connect TNC2014
Feide Connect TNC2014
 
SharePoint 2013 Apps and the App Model
SharePoint 2013 Apps and the App ModelSharePoint 2013 Apps and the App Model
SharePoint 2013 Apps and the App Model
 
Cloud Computing Certification Courses in Pune
Cloud Computing Certification Courses in PuneCloud Computing Certification Courses in Pune
Cloud Computing Certification Courses in Pune
 
Salesforce Training Institutes in Pune MindScripts
Salesforce Training Institutes in Pune MindScriptsSalesforce Training Institutes in Pune MindScripts
Salesforce Training Institutes in Pune MindScripts
 
Cloud computing Training Institutes in Pune : MindScripts
Cloud computing Training Institutes in Pune : MindScriptsCloud computing Training Institutes in Pune : MindScripts
Cloud computing Training Institutes in Pune : MindScripts
 
Cloud computing Training Institutes in Pune : MindScripts
Cloud computing Training Institutes in Pune : MindScriptsCloud computing Training Institutes in Pune : MindScripts
Cloud computing Training Institutes in Pune : MindScripts
 
Cloud computing Training Institutes in Pune : MindScripts
Cloud computing Training Institutes in Pune : MindScriptsCloud computing Training Institutes in Pune : MindScripts
Cloud computing Training Institutes in Pune : MindScripts
 
Salesforce Training Center in Pune - MindScripts
Salesforce Training Center in Pune - MindScriptsSalesforce Training Center in Pune - MindScripts
Salesforce Training Center in Pune - MindScripts
 
Salesforce Certification Courses in Pune - MindScripts
Salesforce Certification Courses in Pune - MindScripts Salesforce Certification Courses in Pune - MindScripts
Salesforce Certification Courses in Pune - MindScripts
 
Salesforce Training in Pune - MindScripts
Salesforce Training in Pune - MindScriptsSalesforce Training in Pune - MindScripts
Salesforce Training in Pune - MindScripts
 
Salesforce Certification in Pune MindScripts
Salesforce Certification in Pune MindScriptsSalesforce Certification in Pune MindScripts
Salesforce Certification in Pune MindScripts
 
Cloud Computing Certification In Pune
Cloud Computing Certification In PuneCloud Computing Certification In Pune
Cloud Computing Certification In Pune
 
Salesforce Courses in Pune MindScripts
Salesforce Courses in Pune MindScriptsSalesforce Courses in Pune MindScripts
Salesforce Courses in Pune MindScripts
 
Cloud Computing Certification In Pimpri Chinchwad
Cloud Computing Certification In Pimpri ChinchwadCloud Computing Certification In Pimpri Chinchwad
Cloud Computing Certification In Pimpri Chinchwad
 

More from Edureka!

More from Edureka! (20)

What to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | EdurekaWhat to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | Edureka
 
Top 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | EdurekaTop 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | Edureka
 
Top 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | EdurekaTop 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | Edureka
 
Tableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | EdurekaTableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | Edureka
 
Python Programming Tutorial | Edureka
Python Programming Tutorial | EdurekaPython Programming Tutorial | Edureka
Python Programming Tutorial | Edureka
 
Top 5 PMP Certifications | Edureka
Top 5 PMP Certifications | EdurekaTop 5 PMP Certifications | Edureka
Top 5 PMP Certifications | Edureka
 
Top Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | EdurekaTop Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | Edureka
 
Linux Mint Tutorial | Edureka
Linux Mint Tutorial | EdurekaLinux Mint Tutorial | Edureka
Linux Mint Tutorial | Edureka
 
How to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| EdurekaHow to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| Edureka
 
Importance of Digital Marketing | Edureka
Importance of Digital Marketing | EdurekaImportance of Digital Marketing | Edureka
Importance of Digital Marketing | Edureka
 
RPA in 2020 | Edureka
RPA in 2020 | EdurekaRPA in 2020 | Edureka
RPA in 2020 | Edureka
 
Email Notifications in Jenkins | Edureka
Email Notifications in Jenkins | EdurekaEmail Notifications in Jenkins | Edureka
Email Notifications in Jenkins | Edureka
 
EA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | EdurekaEA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | Edureka
 
Cognitive AI Tutorial | Edureka
Cognitive AI Tutorial | EdurekaCognitive AI Tutorial | Edureka
Cognitive AI Tutorial | Edureka
 
AWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | EdurekaAWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | Edureka
 
Blue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | EdurekaBlue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | Edureka
 
Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka
 
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | EdurekaA star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
 
Kubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | EdurekaKubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | Edureka
 
Introduction to DevOps | Edureka
Introduction to DevOps | EdurekaIntroduction to DevOps | Edureka
Introduction to DevOps | Edureka
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 

Android 6.0 Marshmallow - Everything you need to know !

  • 1. View Android Development course details at www.edureka.co/android-development-certification-course For Queries: Post on Twitter @edurekaIN: #askEdureka Post on Facebook /edurekaIN For more details please contact us: US : 1800 275 9730 (toll free) INDIA : +91 88808 62004 Email Us : webinars@edureka.co Android 6.0 Marshmallow : Everything you need to know !
  • 2. Slide 2 www.edureka.co/front-end-web-development www.edureka.co/android-development-certification-course Objectives At the end of this module, you will be able to : → Implement Data Binding → Understand Android Percent Layout in Android Marshmallow → Learn about Android M Runtime Permissions → Implement App Linking in Android M → Understand Direct Share feature in Android M
  • 3. Slide 3 www.edureka.co/android-development-certification-course Data Binding  Data binding becomes part of the developer’s tool set in Android Marshmallow  The Data Binding library provides a mechanism for linking the data which will be displayed within our layouts to some kind of back-end data source  Data Binding Library is used to write declarative layouts and minimize the glue code necessary to bind your application logic and layouts  To set up your application to use data binding, add data binding to the class path of your top- level build.gradle file
  • 4. Slide 4 www.edureka.co/android-development-certification-course  Jcenter should be present in your repository list of your projects in Top Level new_project { repositories { jcenter() } }  In the build.gradle for the Android application sub-project we apply a build plugin apply plugin: 'com.android.application' apply plugin: 'com.android.databinding' dependencies { classpath "com.android.tools.build:gradle:1.3.0" classpath "com.android.databinding:dataBinder:1.0-rc1" } Data Binding
  • 5. Slide 5 www.edureka.co/android-development-certification-course  Once the data binding is added , create a POJO for the binding.  Update the layout file by adding some meta-data/markup  Update the activity to declare the data binding Demo Data Binding
  • 6. Slide 6 www.edureka.co/android-development-certification-course Android Percent Layout  There are problems with RelativeLayout and FrameLayout since you cannot set Child View's dimension in percentage  There are times where a particular layout requires us to divide space between components proportionally, but the parent layout is not a LinearLayout  It is not a problem anymore as in Marshmallow, Android team launched many Support Library to help developer fighting with fragmentation. One of those is Percent Support Library which add an capability to set RelativeLayout's and FrameLayout's dimension in % Problem Solution
  • 7. Slide 7 www.edureka.co/android-development-certification-course  First we need to include the percent support library in build.gradle file compile 'com.android.support:percent:23.0.0‘  Now you can switch to android.support.percent.PercentRelativeLayout and android.support.percent.PercentFrameLayout Android Percent Layout Demo
  • 8. Slide 8Slide 8Slide 8 www.edureka.co/android-development-certification-course Runtime Permission  Android 6.0 Marshmallow introduces one of the largest changes to the permissions model with the addition of runtime permissions  It replaces the existing install time permissions model when you target API 23 and the app is running on an Android 6.0+ device  Features : » Ability to control when and with what context you’ll ask for permissions » Google Play will not be required to accept a list of permissions before installing your app » App updates will not be blocked until the user accepts the new permissions
  • 9. Slide 9Slide 9Slide 9 www.edureka.co/android-development-certification-course App Linking  In Android M, when a user clicks on a website link , instead of asking the user to choose how to handle the link he/she directly goes to the website's official app  For example, if a twitter link is there in your inbox and you clicked on it, you used to get a prompt asking if you want to open the link in your browser or within the Twitter app, which is installed on your phone, now you will be directly re-directed to the twitter app, provided twitter app is there on your device.
  • 10. Slide 10Slide 10Slide 10 www.edureka.co/android-development-certification-course  To enable your app to handle links, use intent filters in your app manifest to declare the URI patterns to be handled by your app  To enable link handling verification for your app, set the android:autoVerify attribute to true on at least one of the web URI intent filters in your app manifest App Linking
  • 11. Slide 11Slide 11Slide 11 www.edureka.co/android-development-certification-course  Test you App linking feature by confirming the list of associated hosts that the system should verify for your app  Confirm that the Digital Asset Links JSON file is properly hosted and defined by using the Digital Asset Links API  Testing a web URI intent  Check the current system settings for link handling Test App Linking
  • 12. Slide 12 www.edureka.co/android-development-certification-course Direct Share  Direct Share is a new feature in Marshmallow that provides APIs for allowing users to share content to other sources such as contacts and social networks  Google calls it as a dummy messaging app  Also allows users to share to specific targets, and demonstrates this by adding contacts directly in the chooser dialog  Example - if you frequently send your significant pictures via Hangouts, Android M will recognize this habit and offer a single button to let you share directly with them
  • 13. Slide 13 www.edureka.co/android-development-certification-course  To enable Direct Share, apps need to implement a Service extending ChooserTargetService. Override the method onGetChooserTargets() and return a list of Direct Share options  In your AndroidManifest.xml, add a meta-data tag in your Activity that receives the Intent. Specify android:name as android.service.chooser.chooser_target_service, and point the android:value to the Service Direct Share Demo