SlideShare a Scribd company logo
1 of 21
ANDROID DEVELOPMENT POWERED BY
KOTLIN & JAVA SE 8
MOHAMED TAMAN @_TAMANM
JAVA CHAMPION
Unleash the Dragon
BIOGRAPHY
• Java Champion, and Java Geek
• Enterprise Architect / Innovation & R&D Sr. Manager @efinance
• Mobile/Web/Blockchain/HashGraph/Cloud/DevOps/Big Data/IoT
• JCP (Won Duke’s choice award 2013, 2014, 2015)
• Speaks Java (Won Outstanding adopt-a-jsr participant 2013 JCP annual award)
• International Speaker
• Author (“JavaFX 8 essentials”, and upcoming “Mastering JDK 9” Video training
for Packt and Lynda.com)
Mohamed Taman @_tamanm
REACH ME ON
@_tamanm
http://eg.linkedin.com/in/mohamedtaman/
https://www.facebook.com/mohamed.m.taman.7
(Mohamed Mahmoud Taman)
http://tamanmohamed.blogspot.com
AGENDA
• Why Java SE 8?
• Android Development and Java SE 8
• Start using supported Java 8
• Live Demo
Mohamed Taman @_tamanm
WHY JAVA SE 8?
Mohamed Taman @_tamanm
JAVA SE 8
Java Platform, Standard Edition 8 is a major feature release,
since Java SE 5 release.
Mohamed Taman @_tamanm
BRINGS
Functional Programming to the language, like others Kotlin, Scala,
Groovy,.. and other languages
Mohamed Taman @_tamanm
FUNCTIONAL PROGRAMMING
By introducing Lambda Expressions
Mohamed Taman @_tamanm
LAMBDA EXPRESSION SYNTAX
Mohamed Taman @_tamanm
WHAT'S NEW IN JDK 8
• Lambda Expressions (Covered already)
• Method references
• Default and static interface methods
• Streams & Collections
• For more:
Mohamed Taman @_tamanm
Supported by Android development
https://developer.android.com/studio/preview/features/java8-support.html#supported_features
QUICK LIVE DEMO
Mohamed Taman @_tamanm
http://www.oracle.com/technetwork/java/javase/8-whats-new-2157071.html
ANDROID DEVELOPMENT
AND JAVA SE 8
Mohamed Taman @_tamanm
USE JAVA 8 LANGUAGE FEATURES
• Android Studio 2.4 Preview 4 and later supports all Java SE 7 language features.
• And a subset of Java SE 8 language features.
Mohamed Taman @_tamanm
Note: When developing apps for Android, using Java 8
language features, is optional.
DESUGAR TOOLCHAIN
Is the default toolchain for
new Android Studio 2.4+
Mohamed Taman @_tamanm
.java .class
.class
(desugared)
.dex
javac dexdesugar
Third party
library
Java 8 language feature support using desugar bytecode transformations.
START USING SUPPORTED JAVA 8
Mohamed Taman @_tamanm
UPDATE GRADLE PLUGIN
• Update the Android plugin to 2.4.0 (or higher), you can use latest Gradle v3.5.
• Add the following to your module’s build.gradle file
Mohamed Taman @_tamanm
android {
...
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
API VERSION, VM IMAGE, & TOOLS
• Update API to API level 24 or higher.
• minSdkVersion (24) is Noga Android N or higher should be installed.
• Intel x86 atom System image of Noga SDK.
• Latest build and platform tools v24.0.0+.
• Google Repository v24 or later.
• Intel x86 emulator accelerator (HAXM installer) latest version.
Mohamed Taman @_tamanm
WHY KOTLIN?
Mohamed Taman @_tamanm
Statically typed programming language
for modern multiplatform applications
KOTLIN IS…
• Concise; Drastically reduce the amount of boilerplate code.
• Safe; Avoid entire classes of errors such as null pointer exceptions.
• Interoperable; Leverage existing libraries for the JVM, Android, and the browser.
• Tool – friendly; Choose any Java IDE or build from the command line.
• For more:
Mohamed Taman @_tamanm
Now official on Android
https://kotlinlang.org
LIVE DEMO
Mohamed Taman @_tamanm
Mohamed Taman @_tamanm

More Related Content

What's hot

developing Android and HTML5 apps for the Motorola ATRIX - Taking advantage o...
developing Android and HTML5 apps for the Motorola ATRIX - Taking advantage o...developing Android and HTML5 apps for the Motorola ATRIX - Taking advantage o...
developing Android and HTML5 apps for the Motorola ATRIX - Taking advantage o...Orange Dev
 
Progressive Web Apps - Lightning Talk
Progressive Web Apps - Lightning TalkProgressive Web Apps - Lightning Talk
Progressive Web Apps - Lightning TalkTimmy Kokke
 
Mobile Application Development Using Java
Mobile Application Development Using JavaMobile Application Development Using Java
Mobile Application Development Using JavaNexSoftsys
 
Slr camera app tech spec
Slr camera app tech specSlr camera app tech spec
Slr camera app tech specmattlat10
 
Cross Platform Mobile App Development
Cross Platform Mobile App DevelopmentCross Platform Mobile App Development
Cross Platform Mobile App DevelopmentAnnmarie Lanesey
 
EastBay.NET - Introduction to MonoTouch
EastBay.NET - Introduction to MonoTouchEastBay.NET - Introduction to MonoTouch
EastBay.NET - Introduction to MonoTouchmobiweave
 
3 App Tools Maura Amato TECH510
3 App Tools Maura Amato TECH5103 App Tools Maura Amato TECH510
3 App Tools Maura Amato TECH510maurameyers
 
Lublin Startup Festival - Mobile Architecture Design Patterns
Lublin Startup Festival - Mobile Architecture Design PatternsLublin Startup Festival - Mobile Architecture Design Patterns
Lublin Startup Festival - Mobile Architecture Design PatternsKarol Szmaj
 
Beginners guide to creating mobile apps
Beginners guide to creating mobile appsBeginners guide to creating mobile apps
Beginners guide to creating mobile appsJames Quick
 
From Xcode to App Store, the Agile way @ MoMo Tallinn 06.06.11
From Xcode to App Store, the Agile way @ MoMo Tallinn 06.06.11From Xcode to App Store, the Agile way @ MoMo Tallinn 06.06.11
From Xcode to App Store, the Agile way @ MoMo Tallinn 06.06.11MobileMonday Estonia
 
Moodle Mobile app - MoodleMoot Spain 2014
Moodle Mobile app -  MoodleMoot Spain 2014Moodle Mobile app -  MoodleMoot Spain 2014
Moodle Mobile app - MoodleMoot Spain 2014Juan Leyva Delgado
 
Cross Platform Mobile Application Architecture
Cross Platform Mobile Application ArchitectureCross Platform Mobile Application Architecture
Cross Platform Mobile Application ArchitectureDerrick Bowen
 
Mobile app development sylhet it academy
Mobile app development  sylhet it academyMobile app development  sylhet it academy
Mobile app development sylhet it academySylhet IT Academy
 
GlueCon'11 - Native vs Wrapped Mobile apps : What to Build ?
GlueCon'11 - Native vs Wrapped Mobile apps : What to Build ?GlueCon'11 - Native vs Wrapped Mobile apps : What to Build ?
GlueCon'11 - Native vs Wrapped Mobile apps : What to Build ?Guilhem Ensuque
 
8 steps to a long term mobile strategy
8 steps to a long term mobile strategy 8 steps to a long term mobile strategy
8 steps to a long term mobile strategy Kony, Inc.
 
Mobile Blast - Mobile strategy for developers
Mobile Blast - Mobile strategy for developersMobile Blast - Mobile strategy for developers
Mobile Blast - Mobile strategy for developersJohn Jardin
 
How to make short films on your mobile
How to make short films on your mobileHow to make short films on your mobile
How to make short films on your mobilethejigsaw1
 
Platform vs. Native vs. HTML5: Which mobile development makes sense for your ...
Platform vs. Native vs. HTML5: Which mobile development makes sense for your ...Platform vs. Native vs. HTML5: Which mobile development makes sense for your ...
Platform vs. Native vs. HTML5: Which mobile development makes sense for your ...Kony, Inc.
 

What's hot (20)

"We want an APP!"
"We want an APP!""We want an APP!"
"We want an APP!"
 
developing Android and HTML5 apps for the Motorola ATRIX - Taking advantage o...
developing Android and HTML5 apps for the Motorola ATRIX - Taking advantage o...developing Android and HTML5 apps for the Motorola ATRIX - Taking advantage o...
developing Android and HTML5 apps for the Motorola ATRIX - Taking advantage o...
 
Progressive Web Apps - Lightning Talk
Progressive Web Apps - Lightning TalkProgressive Web Apps - Lightning Talk
Progressive Web Apps - Lightning Talk
 
Mobile Application Development Using Java
Mobile Application Development Using JavaMobile Application Development Using Java
Mobile Application Development Using Java
 
Slr camera app tech spec
Slr camera app tech specSlr camera app tech spec
Slr camera app tech spec
 
Cross Platform Mobile App Development
Cross Platform Mobile App DevelopmentCross Platform Mobile App Development
Cross Platform Mobile App Development
 
EastBay.NET - Introduction to MonoTouch
EastBay.NET - Introduction to MonoTouchEastBay.NET - Introduction to MonoTouch
EastBay.NET - Introduction to MonoTouch
 
3 App Tools Maura Amato TECH510
3 App Tools Maura Amato TECH5103 App Tools Maura Amato TECH510
3 App Tools Maura Amato TECH510
 
Lublin Startup Festival - Mobile Architecture Design Patterns
Lublin Startup Festival - Mobile Architecture Design PatternsLublin Startup Festival - Mobile Architecture Design Patterns
Lublin Startup Festival - Mobile Architecture Design Patterns
 
Beginners guide to creating mobile apps
Beginners guide to creating mobile appsBeginners guide to creating mobile apps
Beginners guide to creating mobile apps
 
From Xcode to App Store, the Agile way @ MoMo Tallinn 06.06.11
From Xcode to App Store, the Agile way @ MoMo Tallinn 06.06.11From Xcode to App Store, the Agile way @ MoMo Tallinn 06.06.11
From Xcode to App Store, the Agile way @ MoMo Tallinn 06.06.11
 
Building mobile apps using Phonegap
Building mobile apps using PhonegapBuilding mobile apps using Phonegap
Building mobile apps using Phonegap
 
Moodle Mobile app - MoodleMoot Spain 2014
Moodle Mobile app -  MoodleMoot Spain 2014Moodle Mobile app -  MoodleMoot Spain 2014
Moodle Mobile app - MoodleMoot Spain 2014
 
Cross Platform Mobile Application Architecture
Cross Platform Mobile Application ArchitectureCross Platform Mobile Application Architecture
Cross Platform Mobile Application Architecture
 
Mobile app development sylhet it academy
Mobile app development  sylhet it academyMobile app development  sylhet it academy
Mobile app development sylhet it academy
 
GlueCon'11 - Native vs Wrapped Mobile apps : What to Build ?
GlueCon'11 - Native vs Wrapped Mobile apps : What to Build ?GlueCon'11 - Native vs Wrapped Mobile apps : What to Build ?
GlueCon'11 - Native vs Wrapped Mobile apps : What to Build ?
 
8 steps to a long term mobile strategy
8 steps to a long term mobile strategy 8 steps to a long term mobile strategy
8 steps to a long term mobile strategy
 
Mobile Blast - Mobile strategy for developers
Mobile Blast - Mobile strategy for developersMobile Blast - Mobile strategy for developers
Mobile Blast - Mobile strategy for developers
 
How to make short films on your mobile
How to make short films on your mobileHow to make short films on your mobile
How to make short films on your mobile
 
Platform vs. Native vs. HTML5: Which mobile development makes sense for your ...
Platform vs. Native vs. HTML5: Which mobile development makes sense for your ...Platform vs. Native vs. HTML5: Which mobile development makes sense for your ...
Platform vs. Native vs. HTML5: Which mobile development makes sense for your ...
 

Similar to Android development powered by Java SE 8 and Kotlin

Android Development Primer - GDG Los Angeles
Android Development Primer - GDG Los AngelesAndroid Development Primer - GDG Los Angeles
Android Development Primer - GDG Los AngelesGerard
 
Webinar on How to use MyAppConverter
Webinar on How to use  MyAppConverterWebinar on How to use  MyAppConverter
Webinar on How to use MyAppConverterJaoued Ahmed
 
Android Scripting
Android ScriptingAndroid Scripting
Android ScriptingJuan Gomez
 
Develop android application with mono for android
Develop android application with mono for androidDevelop android application with mono for android
Develop android application with mono for androidNicko Satria Consulting
 
MOE: Cross Platform Mobile Apps in Java
MOE: Cross Platform Mobile Apps in JavaMOE: Cross Platform Mobile Apps in Java
MOE: Cross Platform Mobile Apps in JavaGergely Kis
 
Introduction Flutter for Create Multiplatform Apps
Introduction Flutter for Create Multiplatform AppsIntroduction Flutter for Create Multiplatform Apps
Introduction Flutter for Create Multiplatform AppsYatno Sudar
 
Overview of DroidCon UK 2015
Overview of DroidCon UK 2015 Overview of DroidCon UK 2015
Overview of DroidCon UK 2015 Elif Boncuk
 
Java Development Company | Xicom
Java Development Company | XicomJava Development Company | Xicom
Java Development Company | XicomRyanForeman5
 
DSDP Mobile Tools for Java Project
DSDP Mobile Tools for Java ProjectDSDP Mobile Tools for Java Project
DSDP Mobile Tools for Java Projectgustavoeliano
 
Trends and future of java
Trends and future of javaTrends and future of java
Trends and future of javaCsaba Toth
 
EMEA AppForum 2015 Android KitKat & Lollipop - new features for enterprise de...
EMEA AppForum 2015 Android KitKat & Lollipop - new features for enterprise de...EMEA AppForum 2015 Android KitKat & Lollipop - new features for enterprise de...
EMEA AppForum 2015 Android KitKat & Lollipop - new features for enterprise de...Pietro F. Maggi
 
Java v/s .NET - Which is Better?
Java v/s .NET - Which is Better?Java v/s .NET - Which is Better?
Java v/s .NET - Which is Better?NIIT India
 
Profiling Android Applications
Profiling Android ApplicationsProfiling Android Applications
Profiling Android Applicationshubx
 
Mobile development with Flutter
Mobile development with FlutterMobile development with Flutter
Mobile development with FlutterAwok
 
Intro To Meteor (Las Vegas Ruby User Group Talk)
Intro To Meteor (Las Vegas Ruby User Group Talk)Intro To Meteor (Las Vegas Ruby User Group Talk)
Intro To Meteor (Las Vegas Ruby User Group Talk)Almog Koren
 
Android Development recipes with java.pptx
Android Development recipes with java.pptxAndroid Development recipes with java.pptx
Android Development recipes with java.pptxabdulqayoomjat2470
 

Similar to Android development powered by Java SE 8 and Kotlin (20)

Android Development Primer - GDG Los Angeles
Android Development Primer - GDG Los AngelesAndroid Development Primer - GDG Los Angeles
Android Development Primer - GDG Los Angeles
 
Webinar on How to use MyAppConverter
Webinar on How to use  MyAppConverterWebinar on How to use  MyAppConverter
Webinar on How to use MyAppConverter
 
Android Scripting
Android ScriptingAndroid Scripting
Android Scripting
 
Develop android application with mono for android
Develop android application with mono for androidDevelop android application with mono for android
Develop android application with mono for android
 
MOE: Cross Platform Mobile Apps in Java
MOE: Cross Platform Mobile Apps in JavaMOE: Cross Platform Mobile Apps in Java
MOE: Cross Platform Mobile Apps in Java
 
gopal hp
gopal hpgopal hp
gopal hp
 
Android Apps
Android AppsAndroid Apps
Android Apps
 
Introduction Flutter for Create Multiplatform Apps
Introduction Flutter for Create Multiplatform AppsIntroduction Flutter for Create Multiplatform Apps
Introduction Flutter for Create Multiplatform Apps
 
Overview of DroidCon UK 2015
Overview of DroidCon UK 2015 Overview of DroidCon UK 2015
Overview of DroidCon UK 2015
 
Java Development Company | Xicom
Java Development Company | XicomJava Development Company | Xicom
Java Development Company | Xicom
 
Android Programming
Android ProgrammingAndroid Programming
Android Programming
 
DSDP Mobile Tools for Java Project
DSDP Mobile Tools for Java ProjectDSDP Mobile Tools for Java Project
DSDP Mobile Tools for Java Project
 
Trends and future of java
Trends and future of javaTrends and future of java
Trends and future of java
 
EMEA AppForum 2015 Android KitKat & Lollipop - new features for enterprise de...
EMEA AppForum 2015 Android KitKat & Lollipop - new features for enterprise de...EMEA AppForum 2015 Android KitKat & Lollipop - new features for enterprise de...
EMEA AppForum 2015 Android KitKat & Lollipop - new features for enterprise de...
 
Java 2012 conference keynote - Java Strategy & Roadmap - WebLogic & GlassFish...
Java 2012 conference keynote - Java Strategy & Roadmap - WebLogic & GlassFish...Java 2012 conference keynote - Java Strategy & Roadmap - WebLogic & GlassFish...
Java 2012 conference keynote - Java Strategy & Roadmap - WebLogic & GlassFish...
 
Java v/s .NET - Which is Better?
Java v/s .NET - Which is Better?Java v/s .NET - Which is Better?
Java v/s .NET - Which is Better?
 
Profiling Android Applications
Profiling Android ApplicationsProfiling Android Applications
Profiling Android Applications
 
Mobile development with Flutter
Mobile development with FlutterMobile development with Flutter
Mobile development with Flutter
 
Intro To Meteor (Las Vegas Ruby User Group Talk)
Intro To Meteor (Las Vegas Ruby User Group Talk)Intro To Meteor (Las Vegas Ruby User Group Talk)
Intro To Meteor (Las Vegas Ruby User Group Talk)
 
Android Development recipes with java.pptx
Android Development recipes with java.pptxAndroid Development recipes with java.pptx
Android Development recipes with java.pptx
 

More from Mohamed Taman

Effective java se 11 through 12 ap is & language features, makes your lif...
Effective java se 11 through 12 ap is & language features, makes your lif...Effective java se 11 through 12 ap is & language features, makes your lif...
Effective java se 11 through 12 ap is & language features, makes your lif...Mohamed Taman
 
Mohamed Taman short C.V version v1.0
Mohamed Taman short C.V version v1.0Mohamed Taman short C.V version v1.0
Mohamed Taman short C.V version v1.0Mohamed Taman
 
Unit testing & TDD concepts with best practice guidelines.
Unit testing & TDD concepts with best practice guidelines.Unit testing & TDD concepts with best practice guidelines.
Unit testing & TDD concepts with best practice guidelines.Mohamed Taman
 
DevOps concepts, tools, and technologies v1.0
DevOps concepts, tools, and technologies v1.0DevOps concepts, tools, and technologies v1.0
DevOps concepts, tools, and technologies v1.0Mohamed Taman
 
Top 10 key performance techniques for hybrid mobile and web apps
Top 10 key performance techniques for hybrid mobile and web appsTop 10 key performance techniques for hybrid mobile and web apps
Top 10 key performance techniques for hybrid mobile and web appsMohamed Taman
 
Operating systems essentials & Android OS concepts
Operating systems essentials & Android OS conceptsOperating systems essentials & Android OS concepts
Operating systems essentials & Android OS conceptsMohamed Taman
 
United nations UNHCR & WFP case study, a java success story
United nations UNHCR & WFP case study, a java success storyUnited nations UNHCR & WFP case study, a java success story
United nations UNHCR & WFP case study, a java success storyMohamed Taman
 
What’s new in Java SE, EE, ME, Embedded world & new Strategy
What’s new in Java SE, EE, ME, Embedded world & new StrategyWhat’s new in Java SE, EE, ME, Embedded world & new Strategy
What’s new in Java SE, EE, ME, Embedded world & new StrategyMohamed Taman
 
Drive yourself, community with adopts and jcp to professionalism
Drive yourself, community with adopts and jcp to professionalismDrive yourself, community with adopts and jcp to professionalism
Drive yourself, community with adopts and jcp to professionalismMohamed Taman
 
Learn HTML5 & JEE7 by doing
Learn HTML5 & JEE7 by doingLearn HTML5 & JEE7 by doing
Learn HTML5 & JEE7 by doingMohamed Taman
 

More from Mohamed Taman (10)

Effective java se 11 through 12 ap is & language features, makes your lif...
Effective java se 11 through 12 ap is & language features, makes your lif...Effective java se 11 through 12 ap is & language features, makes your lif...
Effective java se 11 through 12 ap is & language features, makes your lif...
 
Mohamed Taman short C.V version v1.0
Mohamed Taman short C.V version v1.0Mohamed Taman short C.V version v1.0
Mohamed Taman short C.V version v1.0
 
Unit testing & TDD concepts with best practice guidelines.
Unit testing & TDD concepts with best practice guidelines.Unit testing & TDD concepts with best practice guidelines.
Unit testing & TDD concepts with best practice guidelines.
 
DevOps concepts, tools, and technologies v1.0
DevOps concepts, tools, and technologies v1.0DevOps concepts, tools, and technologies v1.0
DevOps concepts, tools, and technologies v1.0
 
Top 10 key performance techniques for hybrid mobile and web apps
Top 10 key performance techniques for hybrid mobile and web appsTop 10 key performance techniques for hybrid mobile and web apps
Top 10 key performance techniques for hybrid mobile and web apps
 
Operating systems essentials & Android OS concepts
Operating systems essentials & Android OS conceptsOperating systems essentials & Android OS concepts
Operating systems essentials & Android OS concepts
 
United nations UNHCR & WFP case study, a java success story
United nations UNHCR & WFP case study, a java success storyUnited nations UNHCR & WFP case study, a java success story
United nations UNHCR & WFP case study, a java success story
 
What’s new in Java SE, EE, ME, Embedded world & new Strategy
What’s new in Java SE, EE, ME, Embedded world & new StrategyWhat’s new in Java SE, EE, ME, Embedded world & new Strategy
What’s new in Java SE, EE, ME, Embedded world & new Strategy
 
Drive yourself, community with adopts and jcp to professionalism
Drive yourself, community with adopts and jcp to professionalismDrive yourself, community with adopts and jcp to professionalism
Drive yourself, community with adopts and jcp to professionalism
 
Learn HTML5 & JEE7 by doing
Learn HTML5 & JEE7 by doingLearn HTML5 & JEE7 by doing
Learn HTML5 & JEE7 by doing
 

Android development powered by Java SE 8 and Kotlin

  • 1. ANDROID DEVELOPMENT POWERED BY KOTLIN & JAVA SE 8 MOHAMED TAMAN @_TAMANM JAVA CHAMPION Unleash the Dragon
  • 2. BIOGRAPHY • Java Champion, and Java Geek • Enterprise Architect / Innovation & R&D Sr. Manager @efinance • Mobile/Web/Blockchain/HashGraph/Cloud/DevOps/Big Data/IoT • JCP (Won Duke’s choice award 2013, 2014, 2015) • Speaks Java (Won Outstanding adopt-a-jsr participant 2013 JCP annual award) • International Speaker • Author (“JavaFX 8 essentials”, and upcoming “Mastering JDK 9” Video training for Packt and Lynda.com) Mohamed Taman @_tamanm
  • 4. AGENDA • Why Java SE 8? • Android Development and Java SE 8 • Start using supported Java 8 • Live Demo Mohamed Taman @_tamanm
  • 5. WHY JAVA SE 8? Mohamed Taman @_tamanm
  • 6. JAVA SE 8 Java Platform, Standard Edition 8 is a major feature release, since Java SE 5 release. Mohamed Taman @_tamanm
  • 7. BRINGS Functional Programming to the language, like others Kotlin, Scala, Groovy,.. and other languages Mohamed Taman @_tamanm
  • 8. FUNCTIONAL PROGRAMMING By introducing Lambda Expressions Mohamed Taman @_tamanm
  • 10. WHAT'S NEW IN JDK 8 • Lambda Expressions (Covered already) • Method references • Default and static interface methods • Streams & Collections • For more: Mohamed Taman @_tamanm Supported by Android development https://developer.android.com/studio/preview/features/java8-support.html#supported_features
  • 11. QUICK LIVE DEMO Mohamed Taman @_tamanm http://www.oracle.com/technetwork/java/javase/8-whats-new-2157071.html
  • 12. ANDROID DEVELOPMENT AND JAVA SE 8 Mohamed Taman @_tamanm
  • 13. USE JAVA 8 LANGUAGE FEATURES • Android Studio 2.4 Preview 4 and later supports all Java SE 7 language features. • And a subset of Java SE 8 language features. Mohamed Taman @_tamanm Note: When developing apps for Android, using Java 8 language features, is optional.
  • 14. DESUGAR TOOLCHAIN Is the default toolchain for new Android Studio 2.4+ Mohamed Taman @_tamanm .java .class .class (desugared) .dex javac dexdesugar Third party library Java 8 language feature support using desugar bytecode transformations.
  • 15. START USING SUPPORTED JAVA 8 Mohamed Taman @_tamanm
  • 16. UPDATE GRADLE PLUGIN • Update the Android plugin to 2.4.0 (or higher), you can use latest Gradle v3.5. • Add the following to your module’s build.gradle file Mohamed Taman @_tamanm android { ... compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } }
  • 17. API VERSION, VM IMAGE, & TOOLS • Update API to API level 24 or higher. • minSdkVersion (24) is Noga Android N or higher should be installed. • Intel x86 atom System image of Noga SDK. • Latest build and platform tools v24.0.0+. • Google Repository v24 or later. • Intel x86 emulator accelerator (HAXM installer) latest version. Mohamed Taman @_tamanm
  • 18. WHY KOTLIN? Mohamed Taman @_tamanm Statically typed programming language for modern multiplatform applications
  • 19. KOTLIN IS… • Concise; Drastically reduce the amount of boilerplate code. • Safe; Avoid entire classes of errors such as null pointer exceptions. • Interoperable; Leverage existing libraries for the JVM, Android, and the browser. • Tool – friendly; Choose any Java IDE or build from the command line. • For more: Mohamed Taman @_tamanm Now official on Android https://kotlinlang.org

Editor's Notes

  1. Lambda Expressions ------------------------------ A new language feature, has been introduced in this release. They enable you to treat functionality as a method argument, or code as data. Lambda expressions let you express instances of single-method interfaces (referred to as functional interfaces) more compactly.
  2. Method references --------------------------- Provide easy-to-read lambda expressions for methods that already have a name. Default and static methods: -------------------------------------- Enable new functionality to be added to the interfaces of libraries and ensure binary compatibility with code written for older versions of those interfaces. Collections and Streams: -------------------------------------- Classes in the new java.util.stream package provide a Stream API to support functional-style operations on streams of elements. The Stream API is integrated into the Collections API, which enables bulk operations on collections, such as sequential or parallel map-reduce transformations.
  3. Note: When developing apps for Android, using Java 8 language features is optional. You can keep your project's source and target compatibility values set to Java 7, but you still need to compile using JDK 8.
  4. Android Studio now provides built-in support for using certain Java 8 language features and third-party libraries that use them. The default toolchain called desugar implements the new language features by performing bytecode transformations on the output of the javac compiler.