SlideShare une entreprise Scribd logo
1  sur  37
Télécharger pour lire hors ligne
We're an independent
design & development
agency.
infinum.co/android-sweets
Fresh news from Droid zone, curated by Željko Plesac
Benefits of using
Kotlin
DINO KOVAČ
BASIC INFO
• statically typed JVM language
• fully interoperable with Java
• developed by JetBrains
HISTORY
• in development since 2010
• stable version released at 15.2.2016.
• used in 10 projects internally at JetBrains
GOALS
• concise
• expressive
• toolable
• interoperable
• pragmatic
REAL EXAMPLES
MODELS
public static class LoginResponse {



@Json(name = "userName")

private String username;



@Json(name = "token_type")

private String bearer;



@Json(name = "expires_in")

private int expiresIn;



@Json(name = "access_token")

private String accessToken;



@Json(name = "refresh_token")

private String refreshToken;



public LoginResponse(String username, String bearer, int expiresIn, String accessToken, String refreshToken) {

this.username = username;

this.bearer = bearer;

this.expiresIn = expiresIn;

this.accessToken = accessToken;

this.refreshToken = refreshToken;

}



public String getUsername() {

return username;

}



public String getBearer() {

return bearer;

}



public int getExpiresIn() {

return expiresIn;

}



public String getAccessToken() {

return accessToken;

}



public String getRefreshToken() {

return refreshToken;

}

}

class LoginResponse(

@Json(name = "userName") val username: String,

@Json(name = "token_type") val bearer: String,

@Json(name = "expires_in") val expiresIn: Int,

@Json(name = "access_token") val accessToken: String,

@Json(name = "refresh_token") val refreshToken: String

)
KOTLIN ANDROID
EXTENSIONS
OPERATIONS WITH
COLLECTIONS
private List<FilterTagListView> tagGroupViews() {

List<FilterTagListView> filterTagListViews = new ArrayList<>();

for (int i = 0; i < filterContainer.getChildCount(); i++) {

View view = filterContainer.getChildAt(i);

if (view instanceof FilterTagListView) {

filterTagListViews.add((FilterTagListView) view);

}

}

return filterTagListViews;

}
private fun tagGroupViews(): List<FilterTagListView> {

return (0..filterContainer.childCount - 1)

.map { i -> filterContainer.getChildAt(i) }

.filter { childView -> childView is FilterTagListView }

.map { it as FilterTagListView }

}
/**

* finds view group which contains given tag and marks tag selected within that group

*/

public void addSelectedTag(CoupeTag tag) {

FilterTagListView view = null;

List<FilterTagListView> tagGroupViews = tagGroupViews();

for (FilterTagListView tagGroupView : tagGroupViews) {

if (tagGroupView.getFilter().getTitle().equals(tag.getFilter().getTitle())) {

view = tagGroupView;

break;

}

}



if (view != null) {

view.setTagSelection(tag.getTitle());

if (filtersSelectedListener != null) {

filtersSelectedListener.onSelected(getSelectedTags());

}

}

}
/**

* finds view group which contains given tag and marks tag selected within that group

*/

fun addSelectedTag(tag: CoupeTag) {

val view = tagGroupViews().firstOrNull { view ->

view.filter.title == tag.filter.title

}



view?.let {

view.setTagSelection(tag.title)

filterSelectedListener?.onSelected(getSelectedTags()?.toList())

}

}
LISTENER INTERFACES
// adapter

public interface OnCheckedChangeListener {



void onCheckedChange(Genre genre, boolean isChecked);

}



public void setOnCheckedChangeListener(@Nullable OnCheckedChangeListener listener) {

this.listener = listener;

}

if (listener != null) {

listener.onCheckedChange(genre, isChecked);

}

// activity
this.setOnCheckedChangeListener(new OnCheckedChangeListener() {

@Override

public void onCheckedChange(Genre genre, boolean isChecked) {

// TODO magic

}

});
// adapter

var onCheckedChangeListener: ((Genre, Boolean) -> Unit)? = null
onCheckedChangeListener?.invoke(genre, isChecked)
// activity
genresAdapter.onCheckedChangeListener = {

// TODO magic

}
CONVENIENCES
List<AirDate> dummyAirdates = new ArrayList<>();

dummyAirdates.add(new AirDate(ZonedDateTime.now(), 1));

dummyAirdates.add(new AirDate(ZonedDateTime.now().plusDays(1), 2));

dummyAirdates.add(new AirDate(ZonedDateTime.now().plusWeeks(1), 3));
val dummyAirDates = listOf(

AirDate(ZonedDateTime.now(), 1),

AirDate(ZonedDateTime.now().plusDays(1), 2),

AirDate(ZonedDateTime.now().plusWeeks(1), 3)

)
OTHERS
• setOf(), mapOf(), arrayOf()
• emptyList(), emptySet(), emptyMap(),
emptyArray()
• … plenty more
RISKS
WHAT IF JET BRAINS GOES
OUT OF BUSINESS?
JETBRAINS
• 500+ employees
• fully bootstrapped
• steady revenue stream (subscription model)
• heavily invested in Kotlin
LANGUAGE STABILITY
SWIFT
OPEN SOURCE
I think it is fair to say that "open design" is slower
and less predictable than "closed design”.
However, the end result is significantly better, and
therefore the tradeoff is worth it.
- CHRIS LATTNER, APPLE
WHAT IF GOOGLE BREAKS
COMPATIBILITY?
Kotlin is interesting: works well with Java, more
concise. JetBrains has done a nice job supporting
this on android. But no plans to officially support
anything new.
- ANWAR, ANDROIDENGTEAM
I don’t think we have any plans to break what
already works there, but we don’t have plans to
have a second, idiomatic-Kotlin version of the
whole framework API surface area either.
- ADAM, ANDROIDENGTEAM
We don’t have any plans to move to a new
language. Java has a lot of advantages to it and the
versions 8, 9, and 10 have some pretty interesting
stuff for developers.
- ANWAR, ANDROIDENGTEAM
CONCLUSION
• Kotlin can help you be more productive
• Kotlin is here to stay
• Be aware of the risks!
Thank you!
DINO@INFINUM.CO
@DINO_BLACKSMITH
Visit infinum.co or find us on social networks:
infinum.co infinumco infinumco infinum

Contenu connexe

Tendances

Property based tests and where to find them - Andrzej Jóźwiak - TomTom Webina...
Property based tests and where to find them - Andrzej Jóźwiak - TomTom Webina...Property based tests and where to find them - Andrzej Jóźwiak - TomTom Webina...
Property based tests and where to find them - Andrzej Jóźwiak - TomTom Webina...Andrzej Jóźwiak
 
안드로이드 데이터 바인딩
안드로이드 데이터 바인딩안드로이드 데이터 바인딩
안드로이드 데이터 바인딩GDG Korea
 
JWTs - what developers need to know - Dan Moore
JWTs - what developers need to know - Dan MooreJWTs - what developers need to know - Dan Moore
JWTs - what developers need to know - Dan MooreMatt Webb
 
Practical JavaScript Programming - Session 1/8
Practical JavaScript Programming - Session 1/8Practical JavaScript Programming - Session 1/8
Practical JavaScript Programming - Session 1/8Wilson Su
 
C# for-java-developers
C# for-java-developersC# for-java-developers
C# for-java-developersDhaval Dalal
 
Php unit the-mostunknownparts
Php unit the-mostunknownpartsPhp unit the-mostunknownparts
Php unit the-mostunknownpartsBastian Feder
 
Lambda Chops - Recipes for Simpler, More Expressive Code
Lambda Chops - Recipes for Simpler, More Expressive CodeLambda Chops - Recipes for Simpler, More Expressive Code
Lambda Chops - Recipes for Simpler, More Expressive CodeIan Robertson
 
Java Annotation Processing: A Beginner Walkthrough
Java Annotation Processing: A Beginner WalkthroughJava Annotation Processing: A Beginner Walkthrough
Java Annotation Processing: A Beginner WalkthroughMahfuz Islam Bhuiyan
 
Design Patterns Reconsidered
Design Patterns ReconsideredDesign Patterns Reconsidered
Design Patterns ReconsideredAlex Miller
 
Converting your JS library to a jQuery plugin
Converting your JS library to a jQuery pluginConverting your JS library to a jQuery plugin
Converting your JS library to a jQuery pluginthehoagie
 
The Beauty and the Beast
The Beauty and the BeastThe Beauty and the Beast
The Beauty and the BeastBastian Feder
 
Productive Debugging
Productive DebuggingProductive Debugging
Productive DebuggingiThink
 
모던자바의 역습
모던자바의 역습모던자바의 역습
모던자바의 역습DoHyun Jung
 
You code sucks, let's fix it
You code sucks, let's fix itYou code sucks, let's fix it
You code sucks, let's fix itRafael Dohms
 
Jeremiah Caballero - Introduction of Clean Code
Jeremiah Caballero - Introduction of Clean CodeJeremiah Caballero - Introduction of Clean Code
Jeremiah Caballero - Introduction of Clean CodeAwesome Ars Academia
 

Tendances (20)

Enterprise js pratices
Enterprise js praticesEnterprise js pratices
Enterprise js pratices
 
Property based tests and where to find them - Andrzej Jóźwiak - TomTom Webina...
Property based tests and where to find them - Andrzej Jóźwiak - TomTom Webina...Property based tests and where to find them - Andrzej Jóźwiak - TomTom Webina...
Property based tests and where to find them - Andrzej Jóźwiak - TomTom Webina...
 
안드로이드 데이터 바인딩
안드로이드 데이터 바인딩안드로이드 데이터 바인딩
안드로이드 데이터 바인딩
 
JWTs - what developers need to know - Dan Moore
JWTs - what developers need to know - Dan MooreJWTs - what developers need to know - Dan Moore
JWTs - what developers need to know - Dan Moore
 
Practical JavaScript Programming - Session 1/8
Practical JavaScript Programming - Session 1/8Practical JavaScript Programming - Session 1/8
Practical JavaScript Programming - Session 1/8
 
JavaScript Primer
JavaScript PrimerJavaScript Primer
JavaScript Primer
 
Beautiful code
Beautiful codeBeautiful code
Beautiful code
 
jQuery secrets
jQuery secretsjQuery secrets
jQuery secrets
 
C# for-java-developers
C# for-java-developersC# for-java-developers
C# for-java-developers
 
SOLID
SOLIDSOLID
SOLID
 
Php unit the-mostunknownparts
Php unit the-mostunknownpartsPhp unit the-mostunknownparts
Php unit the-mostunknownparts
 
Lambda Chops - Recipes for Simpler, More Expressive Code
Lambda Chops - Recipes for Simpler, More Expressive CodeLambda Chops - Recipes for Simpler, More Expressive Code
Lambda Chops - Recipes for Simpler, More Expressive Code
 
Java Annotation Processing: A Beginner Walkthrough
Java Annotation Processing: A Beginner WalkthroughJava Annotation Processing: A Beginner Walkthrough
Java Annotation Processing: A Beginner Walkthrough
 
Design Patterns Reconsidered
Design Patterns ReconsideredDesign Patterns Reconsidered
Design Patterns Reconsidered
 
Converting your JS library to a jQuery plugin
Converting your JS library to a jQuery pluginConverting your JS library to a jQuery plugin
Converting your JS library to a jQuery plugin
 
The Beauty and the Beast
The Beauty and the BeastThe Beauty and the Beast
The Beauty and the Beast
 
Productive Debugging
Productive DebuggingProductive Debugging
Productive Debugging
 
모던자바의 역습
모던자바의 역습모던자바의 역습
모던자바의 역습
 
You code sucks, let's fix it
You code sucks, let's fix itYou code sucks, let's fix it
You code sucks, let's fix it
 
Jeremiah Caballero - Introduction of Clean Code
Jeremiah Caballero - Introduction of Clean CodeJeremiah Caballero - Introduction of Clean Code
Jeremiah Caballero - Introduction of Clean Code
 

En vedette

Infinum android talks_10_implementing material design
Infinum android talks_10_implementing material designInfinum android talks_10_implementing material design
Infinum android talks_10_implementing material designInfinum
 
Infinum Android Talks #04 - How to publish an android archive (.aar) to Maven...
Infinum Android Talks #04 - How to publish an android archive (.aar) to Maven...Infinum Android Talks #04 - How to publish an android archive (.aar) to Maven...
Infinum Android Talks #04 - How to publish an android archive (.aar) to Maven...Infinum
 
Infinum Android Talks #04 - CouchBase Lite
Infinum Android Talks #04 - CouchBase LiteInfinum Android Talks #04 - CouchBase Lite
Infinum Android Talks #04 - CouchBase LiteInfinum
 
Android opetuksessa 11.9.14
Android opetuksessa 11.9.14Android opetuksessa 11.9.14
Android opetuksessa 11.9.14Matleena Laakso
 
Знакомьтесь, Kotlin
Знакомьтесь, KotlinЗнакомьтесь, Kotlin
Знакомьтесь, KotlinTech Talks @NSU
 
20140531 serebryany lecture01_fantastic_cpp_bugs
20140531 serebryany lecture01_fantastic_cpp_bugs20140531 serebryany lecture01_fantastic_cpp_bugs
20140531 serebryany lecture01_fantastic_cpp_bugsComputer Science Club
 
Do Languages Matter?
Do Languages Matter?Do Languages Matter?
Do Languages Matter?Bruce Eckel
 
Kotlin advanced - language reference for android developers
Kotlin advanced - language reference for android developersKotlin advanced - language reference for android developers
Kotlin advanced - language reference for android developersBartosz Kosarzycki
 
Programming in scala - 1
Programming in scala - 1Programming in scala - 1
Programming in scala - 1Mukesh Kumar
 
Kotlin в production. Как и зачем?
Kotlin в production. Как и зачем?Kotlin в production. Как и зачем?
Kotlin в production. Как и зачем?DotNetConf
 
Infinum Android Talks #20 - DiffUtil
Infinum Android Talks #20 - DiffUtilInfinum Android Talks #20 - DiffUtil
Infinum Android Talks #20 - DiffUtilInfinum
 
Infinum Android Talks #20 - Making your Android apps fast like Blue Runner an...
Infinum Android Talks #20 - Making your Android apps fast like Blue Runner an...Infinum Android Talks #20 - Making your Android apps fast like Blue Runner an...
Infinum Android Talks #20 - Making your Android apps fast like Blue Runner an...Infinum
 
JavaOne 2016 - Kotlin: The Language of The Future For JVM?
JavaOne 2016 - Kotlin: The Language of The Future For JVM?JavaOne 2016 - Kotlin: The Language of The Future For JVM?
JavaOne 2016 - Kotlin: The Language of The Future For JVM?Leonardo Zanivan
 
Kotlin: Why Do You Care?
Kotlin: Why Do You Care?Kotlin: Why Do You Care?
Kotlin: Why Do You Care?intelliyole
 
TMPA-2015: Kotlin: From Null Dereference to Smart Casts
TMPA-2015: Kotlin: From Null Dereference to Smart CastsTMPA-2015: Kotlin: From Null Dereference to Smart Casts
TMPA-2015: Kotlin: From Null Dereference to Smart CastsIosif Itkin
 
Scala in practice
Scala in practiceScala in practice
Scala in practiceTomer Gabel
 

En vedette (20)

Infinum android talks_10_implementing material design
Infinum android talks_10_implementing material designInfinum android talks_10_implementing material design
Infinum android talks_10_implementing material design
 
Infinum Android Talks #04 - How to publish an android archive (.aar) to Maven...
Infinum Android Talks #04 - How to publish an android archive (.aar) to Maven...Infinum Android Talks #04 - How to publish an android archive (.aar) to Maven...
Infinum Android Talks #04 - How to publish an android archive (.aar) to Maven...
 
Infinum Android Talks #04 - CouchBase Lite
Infinum Android Talks #04 - CouchBase LiteInfinum Android Talks #04 - CouchBase Lite
Infinum Android Talks #04 - CouchBase Lite
 
Scala
ScalaScala
Scala
 
Scala Day by Day
Scala Day by DayScala Day by Day
Scala Day by Day
 
Android opetuksessa 11.9.14
Android opetuksessa 11.9.14Android opetuksessa 11.9.14
Android opetuksessa 11.9.14
 
Знакомьтесь, Kotlin
Знакомьтесь, KotlinЗнакомьтесь, Kotlin
Знакомьтесь, Kotlin
 
20140531 serebryany lecture01_fantastic_cpp_bugs
20140531 serebryany lecture01_fantastic_cpp_bugs20140531 serebryany lecture01_fantastic_cpp_bugs
20140531 serebryany lecture01_fantastic_cpp_bugs
 
Kotlin Overview
Kotlin OverviewKotlin Overview
Kotlin Overview
 
Intro to kotlin
Intro to kotlinIntro to kotlin
Intro to kotlin
 
Do Languages Matter?
Do Languages Matter?Do Languages Matter?
Do Languages Matter?
 
Kotlin advanced - language reference for android developers
Kotlin advanced - language reference for android developersKotlin advanced - language reference for android developers
Kotlin advanced - language reference for android developers
 
Programming in scala - 1
Programming in scala - 1Programming in scala - 1
Programming in scala - 1
 
Kotlin в production. Как и зачем?
Kotlin в production. Как и зачем?Kotlin в production. Как и зачем?
Kotlin в production. Как и зачем?
 
Infinum Android Talks #20 - DiffUtil
Infinum Android Talks #20 - DiffUtilInfinum Android Talks #20 - DiffUtil
Infinum Android Talks #20 - DiffUtil
 
Infinum Android Talks #20 - Making your Android apps fast like Blue Runner an...
Infinum Android Talks #20 - Making your Android apps fast like Blue Runner an...Infinum Android Talks #20 - Making your Android apps fast like Blue Runner an...
Infinum Android Talks #20 - Making your Android apps fast like Blue Runner an...
 
JavaOne 2016 - Kotlin: The Language of The Future For JVM?
JavaOne 2016 - Kotlin: The Language of The Future For JVM?JavaOne 2016 - Kotlin: The Language of The Future For JVM?
JavaOne 2016 - Kotlin: The Language of The Future For JVM?
 
Kotlin: Why Do You Care?
Kotlin: Why Do You Care?Kotlin: Why Do You Care?
Kotlin: Why Do You Care?
 
TMPA-2015: Kotlin: From Null Dereference to Smart Casts
TMPA-2015: Kotlin: From Null Dereference to Smart CastsTMPA-2015: Kotlin: From Null Dereference to Smart Casts
TMPA-2015: Kotlin: From Null Dereference to Smart Casts
 
Scala in practice
Scala in practiceScala in practice
Scala in practice
 

Similaire à Infinum Android Talks #20 - Benefits of using Kotlin

Introduction to CDI and DI in Java EE 6
Introduction to CDI and DI in Java EE 6Introduction to CDI and DI in Java EE 6
Introduction to CDI and DI in Java EE 6Ray Ploski
 
Introduction to cdi given at java one 2014
Introduction to cdi given at java one 2014Introduction to cdi given at java one 2014
Introduction to cdi given at java one 2014Antoine Sabot-Durand
 
Teste de Integração com DbUnit e jIntegrity
Teste de Integração com DbUnit e jIntegrityTeste de Integração com DbUnit e jIntegrity
Teste de Integração com DbUnit e jIntegrityWashington Botelho
 
Тарас Олексин - Sculpt! Your! Tests!
Тарас Олексин  - Sculpt! Your! Tests!Тарас Олексин  - Sculpt! Your! Tests!
Тарас Олексин - Sculpt! Your! Tests!DataArt
 
Meetup di GDG Italia - Leonardo Pirro - Codemotion Rome 2018
Meetup di GDG Italia - Leonardo Pirro -  Codemotion Rome 2018 Meetup di GDG Italia - Leonardo Pirro -  Codemotion Rome 2018
Meetup di GDG Italia - Leonardo Pirro - Codemotion Rome 2018 Codemotion
 
To inject or not to inject: CDI is the question
To inject or not to inject: CDI is the questionTo inject or not to inject: CDI is the question
To inject or not to inject: CDI is the questionAntonio Goncalves
 
比XML更好用的Java Annotation
比XML更好用的Java Annotation比XML更好用的Java Annotation
比XML更好用的Java Annotationjavatwo2011
 
#ITsubbotnik Spring 2017: Roman Iovlev "Java edge in test automation"
#ITsubbotnik Spring 2017: Roman Iovlev "Java edge in test automation"#ITsubbotnik Spring 2017: Roman Iovlev "Java edge in test automation"
#ITsubbotnik Spring 2017: Roman Iovlev "Java edge in test automation"epamspb
 
Android Architecture Components
Android Architecture ComponentsAndroid Architecture Components
Android Architecture ComponentsBurhanuddinRashid
 
Android architecture component - FbCircleDev Yogyakarta Indonesia
Android architecture component - FbCircleDev Yogyakarta IndonesiaAndroid architecture component - FbCircleDev Yogyakarta Indonesia
Android architecture component - FbCircleDev Yogyakarta IndonesiaPratama Nur Wijaya
 
1/3 : introduction to CDI - Antoine Sabot-Durand
1/3 : introduction to CDI - Antoine Sabot-Durand1/3 : introduction to CDI - Antoine Sabot-Durand
1/3 : introduction to CDI - Antoine Sabot-DurandSOAT
 
15 tips to improve your unit tests (Droidcon Berlin 2016 Barcamp)
15 tips to improve your unit tests (Droidcon Berlin 2016 Barcamp)15 tips to improve your unit tests (Droidcon Berlin 2016 Barcamp)
15 tips to improve your unit tests (Droidcon Berlin 2016 Barcamp)Danny Preussler
 
Android Bootstrap
Android BootstrapAndroid Bootstrap
Android Bootstrapdonnfelker
 

Similaire à Infinum Android Talks #20 - Benefits of using Kotlin (20)

Introduction to CDI and DI in Java EE 6
Introduction to CDI and DI in Java EE 6Introduction to CDI and DI in Java EE 6
Introduction to CDI and DI in Java EE 6
 
Introduction to cdi given at java one 2014
Introduction to cdi given at java one 2014Introduction to cdi given at java one 2014
Introduction to cdi given at java one 2014
 
Teste de Integração com DbUnit e jIntegrity
Teste de Integração com DbUnit e jIntegrityTeste de Integração com DbUnit e jIntegrity
Teste de Integração com DbUnit e jIntegrity
 
Bean Intro
Bean IntroBean Intro
Bean Intro
 
droidparts
droidpartsdroidparts
droidparts
 
Тарас Олексин - Sculpt! Your! Tests!
Тарас Олексин  - Sculpt! Your! Tests!Тарас Олексин  - Sculpt! Your! Tests!
Тарас Олексин - Sculpt! Your! Tests!
 
Meetup di GDG Italia - Leonardo Pirro - Codemotion Rome 2018
Meetup di GDG Italia - Leonardo Pirro -  Codemotion Rome 2018 Meetup di GDG Italia - Leonardo Pirro -  Codemotion Rome 2018
Meetup di GDG Italia - Leonardo Pirro - Codemotion Rome 2018
 
CDI @javaonehyderabad
CDI @javaonehyderabadCDI @javaonehyderabad
CDI @javaonehyderabad
 
To inject or not to inject: CDI is the question
To inject or not to inject: CDI is the questionTo inject or not to inject: CDI is the question
To inject or not to inject: CDI is the question
 
Expression Language 3.0
Expression Language 3.0Expression Language 3.0
Expression Language 3.0
 
比XML更好用的Java Annotation
比XML更好用的Java Annotation比XML更好用的Java Annotation
比XML更好用的Java Annotation
 
#ITsubbotnik Spring 2017: Roman Iovlev "Java edge in test automation"
#ITsubbotnik Spring 2017: Roman Iovlev "Java edge in test automation"#ITsubbotnik Spring 2017: Roman Iovlev "Java edge in test automation"
#ITsubbotnik Spring 2017: Roman Iovlev "Java edge in test automation"
 
Android Architecture Components
Android Architecture ComponentsAndroid Architecture Components
Android Architecture Components
 
Android architecture component - FbCircleDev Yogyakarta Indonesia
Android architecture component - FbCircleDev Yogyakarta IndonesiaAndroid architecture component - FbCircleDev Yogyakarta Indonesia
Android architecture component - FbCircleDev Yogyakarta Indonesia
 
1/3 : introduction to CDI - Antoine Sabot-Durand
1/3 : introduction to CDI - Antoine Sabot-Durand1/3 : introduction to CDI - Antoine Sabot-Durand
1/3 : introduction to CDI - Antoine Sabot-Durand
 
Solid principles
Solid principlesSolid principles
Solid principles
 
15 tips to improve your unit tests (Droidcon Berlin 2016 Barcamp)
15 tips to improve your unit tests (Droidcon Berlin 2016 Barcamp)15 tips to improve your unit tests (Droidcon Berlin 2016 Barcamp)
15 tips to improve your unit tests (Droidcon Berlin 2016 Barcamp)
 
Codemotion appengine
Codemotion appengineCodemotion appengine
Codemotion appengine
 
Android Bootstrap
Android BootstrapAndroid Bootstrap
Android Bootstrap
 
S313937 cdi dochez
S313937 cdi dochezS313937 cdi dochez
S313937 cdi dochez
 

Plus de Infinum

Infinum iOS Talks #4 - Making our VIPER more reactive
Infinum iOS Talks #4 - Making our VIPER more reactiveInfinum iOS Talks #4 - Making our VIPER more reactive
Infinum iOS Talks #4 - Making our VIPER more reactiveInfinum
 
Infinum iOS Talks #4 - Making your Swift networking code more awesome with Re...
Infinum iOS Talks #4 - Making your Swift networking code more awesome with Re...Infinum iOS Talks #4 - Making your Swift networking code more awesome with Re...
Infinum iOS Talks #4 - Making your Swift networking code more awesome with Re...Infinum
 
Infinum Android Talks #13 - Using ViewDragHelper
Infinum Android Talks #13 - Using ViewDragHelperInfinum Android Talks #13 - Using ViewDragHelper
Infinum Android Talks #13 - Using ViewDragHelperInfinum
 
Infinum Android Talks #14 - Log4j
Infinum Android Talks #14 - Log4jInfinum Android Talks #14 - Log4j
Infinum Android Talks #14 - Log4jInfinum
 
Infinum Android Talks #9 - Making your app location-aware
Infinum Android Talks #9 - Making your app location-awareInfinum Android Talks #9 - Making your app location-aware
Infinum Android Talks #9 - Making your app location-awareInfinum
 
Infinum Android Talks #14 - Gradle plugins
Infinum Android Talks #14 - Gradle pluginsInfinum Android Talks #14 - Gradle plugins
Infinum Android Talks #14 - Gradle pluginsInfinum
 
Infinum Android Talks #14 - Facebook for Android API
Infinum Android Talks #14 - Facebook for Android APIInfinum Android Talks #14 - Facebook for Android API
Infinum Android Talks #14 - Facebook for Android APIInfinum
 
Infinum Android Talks #19 - Stop wasting time fixing bugs with TDD by Domagoj...
Infinum Android Talks #19 - Stop wasting time fixing bugs with TDD by Domagoj...Infinum Android Talks #19 - Stop wasting time fixing bugs with TDD by Domagoj...
Infinum Android Talks #19 - Stop wasting time fixing bugs with TDD by Domagoj...Infinum
 
Infinum Android Talks #18 - Create fun lists by Ivan Marić
Infinum Android Talks #18 - Create fun lists by Ivan MarićInfinum Android Talks #18 - Create fun lists by Ivan Marić
Infinum Android Talks #18 - Create fun lists by Ivan MarićInfinum
 
Infinum Android Talks #18 - In-app billing by Ivan Marić
Infinum Android Talks #18 - In-app billing by Ivan MarićInfinum Android Talks #18 - In-app billing by Ivan Marić
Infinum Android Talks #18 - In-app billing by Ivan MarićInfinum
 
Infinum Android Talks #18 - How to cache like a boss by Željko Plesac
Infinum Android Talks #18 - How to cache like a boss by Željko PlesacInfinum Android Talks #18 - How to cache like a boss by Željko Plesac
Infinum Android Talks #18 - How to cache like a boss by Željko PlesacInfinum
 
Infinum iOS Talks #2 - VIPER for everybody by Damjan Vujaklija
Infinum iOS Talks #2 - VIPER for everybody by Damjan VujaklijaInfinum iOS Talks #2 - VIPER for everybody by Damjan Vujaklija
Infinum iOS Talks #2 - VIPER for everybody by Damjan VujaklijaInfinum
 
Infinum iOS Talks #2 - Xamarin by Ivan Đikić
Infinum iOS Talks #2 - Xamarin by Ivan ĐikićInfinum iOS Talks #2 - Xamarin by Ivan Đikić
Infinum iOS Talks #2 - Xamarin by Ivan ĐikićInfinum
 
Infinum iOS Talks #1 - Swift under the hood: Method Dispatching by Vlaho Poluta
Infinum iOS Talks #1 - Swift under the hood: Method Dispatching by Vlaho PolutaInfinum iOS Talks #1 - Swift under the hood: Method Dispatching by Vlaho Poluta
Infinum iOS Talks #1 - Swift under the hood: Method Dispatching by Vlaho PolutaInfinum
 
Infinum iOS Talks #1 - Swift done right by Ivan Dikic
Infinum iOS Talks #1 - Swift done right by Ivan DikicInfinum iOS Talks #1 - Swift done right by Ivan Dikic
Infinum iOS Talks #1 - Swift done right by Ivan DikicInfinum
 
Infinum iOS Talks #1 - Becoming an iOS developer swiftly by Vedran Burojevic
Infinum iOS Talks #1 - Becoming an iOS developer swiftly by Vedran BurojevicInfinum iOS Talks #1 - Becoming an iOS developer swiftly by Vedran Burojevic
Infinum iOS Talks #1 - Becoming an iOS developer swiftly by Vedran BurojevicInfinum
 
Infinum Android Talks #17 - Testing your Android applications by Ivan Kust
Infinum Android Talks #17 - Testing your Android applications by Ivan KustInfinum Android Talks #17 - Testing your Android applications by Ivan Kust
Infinum Android Talks #17 - Testing your Android applications by Ivan KustInfinum
 
Infinum Android Talks #17 - A quest for WebSockets by Zeljko Plesac
Infinum Android Talks #17 - A quest for WebSockets by Zeljko PlesacInfinum Android Talks #17 - A quest for WebSockets by Zeljko Plesac
Infinum Android Talks #17 - A quest for WebSockets by Zeljko PlesacInfinum
 
Infinum Android Talks #17 - Developing an Android library by Dino Kovac
Infinum Android Talks #17 - Developing an Android library  by Dino KovacInfinum Android Talks #17 - Developing an Android library  by Dino Kovac
Infinum Android Talks #17 - Developing an Android library by Dino KovacInfinum
 
Infinum Android Talks #17 - Intro by Ivan Kocijan
Infinum Android Talks #17 - Intro by Ivan KocijanInfinum Android Talks #17 - Intro by Ivan Kocijan
Infinum Android Talks #17 - Intro by Ivan KocijanInfinum
 

Plus de Infinum (20)

Infinum iOS Talks #4 - Making our VIPER more reactive
Infinum iOS Talks #4 - Making our VIPER more reactiveInfinum iOS Talks #4 - Making our VIPER more reactive
Infinum iOS Talks #4 - Making our VIPER more reactive
 
Infinum iOS Talks #4 - Making your Swift networking code more awesome with Re...
Infinum iOS Talks #4 - Making your Swift networking code more awesome with Re...Infinum iOS Talks #4 - Making your Swift networking code more awesome with Re...
Infinum iOS Talks #4 - Making your Swift networking code more awesome with Re...
 
Infinum Android Talks #13 - Using ViewDragHelper
Infinum Android Talks #13 - Using ViewDragHelperInfinum Android Talks #13 - Using ViewDragHelper
Infinum Android Talks #13 - Using ViewDragHelper
 
Infinum Android Talks #14 - Log4j
Infinum Android Talks #14 - Log4jInfinum Android Talks #14 - Log4j
Infinum Android Talks #14 - Log4j
 
Infinum Android Talks #9 - Making your app location-aware
Infinum Android Talks #9 - Making your app location-awareInfinum Android Talks #9 - Making your app location-aware
Infinum Android Talks #9 - Making your app location-aware
 
Infinum Android Talks #14 - Gradle plugins
Infinum Android Talks #14 - Gradle pluginsInfinum Android Talks #14 - Gradle plugins
Infinum Android Talks #14 - Gradle plugins
 
Infinum Android Talks #14 - Facebook for Android API
Infinum Android Talks #14 - Facebook for Android APIInfinum Android Talks #14 - Facebook for Android API
Infinum Android Talks #14 - Facebook for Android API
 
Infinum Android Talks #19 - Stop wasting time fixing bugs with TDD by Domagoj...
Infinum Android Talks #19 - Stop wasting time fixing bugs with TDD by Domagoj...Infinum Android Talks #19 - Stop wasting time fixing bugs with TDD by Domagoj...
Infinum Android Talks #19 - Stop wasting time fixing bugs with TDD by Domagoj...
 
Infinum Android Talks #18 - Create fun lists by Ivan Marić
Infinum Android Talks #18 - Create fun lists by Ivan MarićInfinum Android Talks #18 - Create fun lists by Ivan Marić
Infinum Android Talks #18 - Create fun lists by Ivan Marić
 
Infinum Android Talks #18 - In-app billing by Ivan Marić
Infinum Android Talks #18 - In-app billing by Ivan MarićInfinum Android Talks #18 - In-app billing by Ivan Marić
Infinum Android Talks #18 - In-app billing by Ivan Marić
 
Infinum Android Talks #18 - How to cache like a boss by Željko Plesac
Infinum Android Talks #18 - How to cache like a boss by Željko PlesacInfinum Android Talks #18 - How to cache like a boss by Željko Plesac
Infinum Android Talks #18 - How to cache like a boss by Željko Plesac
 
Infinum iOS Talks #2 - VIPER for everybody by Damjan Vujaklija
Infinum iOS Talks #2 - VIPER for everybody by Damjan VujaklijaInfinum iOS Talks #2 - VIPER for everybody by Damjan Vujaklija
Infinum iOS Talks #2 - VIPER for everybody by Damjan Vujaklija
 
Infinum iOS Talks #2 - Xamarin by Ivan Đikić
Infinum iOS Talks #2 - Xamarin by Ivan ĐikićInfinum iOS Talks #2 - Xamarin by Ivan Đikić
Infinum iOS Talks #2 - Xamarin by Ivan Đikić
 
Infinum iOS Talks #1 - Swift under the hood: Method Dispatching by Vlaho Poluta
Infinum iOS Talks #1 - Swift under the hood: Method Dispatching by Vlaho PolutaInfinum iOS Talks #1 - Swift under the hood: Method Dispatching by Vlaho Poluta
Infinum iOS Talks #1 - Swift under the hood: Method Dispatching by Vlaho Poluta
 
Infinum iOS Talks #1 - Swift done right by Ivan Dikic
Infinum iOS Talks #1 - Swift done right by Ivan DikicInfinum iOS Talks #1 - Swift done right by Ivan Dikic
Infinum iOS Talks #1 - Swift done right by Ivan Dikic
 
Infinum iOS Talks #1 - Becoming an iOS developer swiftly by Vedran Burojevic
Infinum iOS Talks #1 - Becoming an iOS developer swiftly by Vedran BurojevicInfinum iOS Talks #1 - Becoming an iOS developer swiftly by Vedran Burojevic
Infinum iOS Talks #1 - Becoming an iOS developer swiftly by Vedran Burojevic
 
Infinum Android Talks #17 - Testing your Android applications by Ivan Kust
Infinum Android Talks #17 - Testing your Android applications by Ivan KustInfinum Android Talks #17 - Testing your Android applications by Ivan Kust
Infinum Android Talks #17 - Testing your Android applications by Ivan Kust
 
Infinum Android Talks #17 - A quest for WebSockets by Zeljko Plesac
Infinum Android Talks #17 - A quest for WebSockets by Zeljko PlesacInfinum Android Talks #17 - A quest for WebSockets by Zeljko Plesac
Infinum Android Talks #17 - A quest for WebSockets by Zeljko Plesac
 
Infinum Android Talks #17 - Developing an Android library by Dino Kovac
Infinum Android Talks #17 - Developing an Android library  by Dino KovacInfinum Android Talks #17 - Developing an Android library  by Dino Kovac
Infinum Android Talks #17 - Developing an Android library by Dino Kovac
 
Infinum Android Talks #17 - Intro by Ivan Kocijan
Infinum Android Talks #17 - Intro by Ivan KocijanInfinum Android Talks #17 - Intro by Ivan Kocijan
Infinum Android Talks #17 - Intro by Ivan Kocijan
 

Dernier

The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
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
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
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
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....ShaimaaMohamedGalal
 
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
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
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
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
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
 

Dernier (20)

The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
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
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.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 🔝✔️✔️
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
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 ...
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....
 
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-...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
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...
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
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
 

Infinum Android Talks #20 - Benefits of using Kotlin

  • 1. We're an independent design & development agency.
  • 2. infinum.co/android-sweets Fresh news from Droid zone, curated by Željko Plesac
  • 4. BASIC INFO • statically typed JVM language • fully interoperable with Java • developed by JetBrains
  • 5. HISTORY • in development since 2010 • stable version released at 15.2.2016. • used in 10 projects internally at JetBrains
  • 6. GOALS • concise • expressive • toolable • interoperable • pragmatic
  • 9. public static class LoginResponse {
 
 @Json(name = "userName")
 private String username;
 
 @Json(name = "token_type")
 private String bearer;
 
 @Json(name = "expires_in")
 private int expiresIn;
 
 @Json(name = "access_token")
 private String accessToken;
 
 @Json(name = "refresh_token")
 private String refreshToken;
 
 public LoginResponse(String username, String bearer, int expiresIn, String accessToken, String refreshToken) {
 this.username = username;
 this.bearer = bearer;
 this.expiresIn = expiresIn;
 this.accessToken = accessToken;
 this.refreshToken = refreshToken;
 }
 
 public String getUsername() {
 return username;
 }
 
 public String getBearer() {
 return bearer;
 }
 
 public int getExpiresIn() {
 return expiresIn;
 }
 
 public String getAccessToken() {
 return accessToken;
 }
 
 public String getRefreshToken() {
 return refreshToken;
 }
 }

  • 10. class LoginResponse(
 @Json(name = "userName") val username: String,
 @Json(name = "token_type") val bearer: String,
 @Json(name = "expires_in") val expiresIn: Int,
 @Json(name = "access_token") val accessToken: String,
 @Json(name = "refresh_token") val refreshToken: String
 )
  • 12.
  • 14. private List<FilterTagListView> tagGroupViews() {
 List<FilterTagListView> filterTagListViews = new ArrayList<>();
 for (int i = 0; i < filterContainer.getChildCount(); i++) {
 View view = filterContainer.getChildAt(i);
 if (view instanceof FilterTagListView) {
 filterTagListViews.add((FilterTagListView) view);
 }
 }
 return filterTagListViews;
 }
  • 15. private fun tagGroupViews(): List<FilterTagListView> {
 return (0..filterContainer.childCount - 1)
 .map { i -> filterContainer.getChildAt(i) }
 .filter { childView -> childView is FilterTagListView }
 .map { it as FilterTagListView }
 }
  • 16. /**
 * finds view group which contains given tag and marks tag selected within that group
 */
 public void addSelectedTag(CoupeTag tag) {
 FilterTagListView view = null;
 List<FilterTagListView> tagGroupViews = tagGroupViews();
 for (FilterTagListView tagGroupView : tagGroupViews) {
 if (tagGroupView.getFilter().getTitle().equals(tag.getFilter().getTitle())) {
 view = tagGroupView;
 break;
 }
 }
 
 if (view != null) {
 view.setTagSelection(tag.getTitle());
 if (filtersSelectedListener != null) {
 filtersSelectedListener.onSelected(getSelectedTags());
 }
 }
 }
  • 17. /**
 * finds view group which contains given tag and marks tag selected within that group
 */
 fun addSelectedTag(tag: CoupeTag) {
 val view = tagGroupViews().firstOrNull { view ->
 view.filter.title == tag.filter.title
 }
 
 view?.let {
 view.setTagSelection(tag.title)
 filterSelectedListener?.onSelected(getSelectedTags()?.toList())
 }
 }
  • 19. // adapter
 public interface OnCheckedChangeListener {
 
 void onCheckedChange(Genre genre, boolean isChecked);
 }
 
 public void setOnCheckedChangeListener(@Nullable OnCheckedChangeListener listener) {
 this.listener = listener;
 }
 if (listener != null) {
 listener.onCheckedChange(genre, isChecked);
 }
 // activity this.setOnCheckedChangeListener(new OnCheckedChangeListener() {
 @Override
 public void onCheckedChange(Genre genre, boolean isChecked) {
 // TODO magic
 }
 });
  • 20. // adapter
 var onCheckedChangeListener: ((Genre, Boolean) -> Unit)? = null onCheckedChangeListener?.invoke(genre, isChecked) // activity genresAdapter.onCheckedChangeListener = {
 // TODO magic
 }
  • 22. List<AirDate> dummyAirdates = new ArrayList<>();
 dummyAirdates.add(new AirDate(ZonedDateTime.now(), 1));
 dummyAirdates.add(new AirDate(ZonedDateTime.now().plusDays(1), 2));
 dummyAirdates.add(new AirDate(ZonedDateTime.now().plusWeeks(1), 3));
  • 23. val dummyAirDates = listOf(
 AirDate(ZonedDateTime.now(), 1),
 AirDate(ZonedDateTime.now().plusDays(1), 2),
 AirDate(ZonedDateTime.now().plusWeeks(1), 3)
 )
  • 24. OTHERS • setOf(), mapOf(), arrayOf() • emptyList(), emptySet(), emptyMap(), emptyArray() • … plenty more
  • 25. RISKS
  • 26. WHAT IF JET BRAINS GOES OUT OF BUSINESS?
  • 27. JETBRAINS • 500+ employees • fully bootstrapped • steady revenue stream (subscription model) • heavily invested in Kotlin
  • 30.
  • 31. I think it is fair to say that "open design" is slower and less predictable than "closed design”. However, the end result is significantly better, and therefore the tradeoff is worth it. - CHRIS LATTNER, APPLE
  • 32. WHAT IF GOOGLE BREAKS COMPATIBILITY?
  • 33. Kotlin is interesting: works well with Java, more concise. JetBrains has done a nice job supporting this on android. But no plans to officially support anything new. - ANWAR, ANDROIDENGTEAM
  • 34. I don’t think we have any plans to break what already works there, but we don’t have plans to have a second, idiomatic-Kotlin version of the whole framework API surface area either. - ADAM, ANDROIDENGTEAM
  • 35. We don’t have any plans to move to a new language. Java has a lot of advantages to it and the versions 8, 9, and 10 have some pretty interesting stuff for developers. - ANWAR, ANDROIDENGTEAM
  • 36. CONCLUSION • Kotlin can help you be more productive • Kotlin is here to stay • Be aware of the risks!
  • 37. Thank you! DINO@INFINUM.CO @DINO_BLACKSMITH Visit infinum.co or find us on social networks: infinum.co infinumco infinumco infinum