SlideShare a Scribd company logo
1 of 42
Download to read offline
STOP
PUSHING
USERS
AWAY!
Contextual communications and why you should care
<Say>Hello #DroidconDE!</Say>
marcos@twilio.com
Developer Evangelist @ Twilio
@marcos_placona
>7.2bn
A few numbers
@marcos_placona
@marcos_placona
@marcos_placona
Contacting experience
@marcos_placona
Contacting experience
@marcos_placona
Contacting experience
@marcos_placona
@marcos_placona
@marcos_placona
@marcos_placona
Contacting experience
@marcos_placona
intent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + "1234567890"));

if (ActivityCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.CALL_PHONE) !=
PackageManager.PERMISSION_GRANTED) {

startActivity(intent);

}
<uses-permission android:name="android.permission.CALL_PHONE" />
@marcos_placona
Android
@marcos_placona
AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);

builder.setMessage("Calling...")

.setCancelable(false)

.setPositiveButton("Hang-up", new DialogInterface.OnClickListener() {

public void onClick(DialogInterface dialog, int id) {

phone.disconnect();

}

});

AlertDialog alert = builder.create();

alert.show();



phone.connect("+1234567890");
@marcos_placona
Android
AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);

builder.setMessage("Calling...")

.setCancelable(false)

.setPositiveButton("Hang-up", new DialogInterface.OnClickListener() {

public void onClick(DialogInterface dialog, int id) {

phone.disconnect();

}

});

AlertDialog alert = builder.create();

alert.show();



phone.connect("+1234567890");
@marcos_placona
Android
Demo Time
@marcos_placona
@marcos_placona
@marcos_placona
@marcos_placona
@marcos_placona
try {

getApplicationContext().getPackageManager().getPackageInfo("com.facebook.katana", 0);

startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("fb://page/<id_here>")));

} catch (PackageManager.NameNotFoundException e) {

e.printStackTrace();

}
@marcos_placona
Android
try {

getApplicationContext().getPackageManager().getPackageInfo("com.facebook.katana", 0);

startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("fb://page/<id_here>")));

} catch (PackageManager.NameNotFoundException e) {

startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.facebook.com/<user_name_here>")));

}
@marcos_placona
Android
@marcos_placona
Demo Time
@marcos_placona
Bots?
@marcos_placona
@marcos_placona
@marcos_placona
@marcos_placona
Demo Time
@marcos_placona
@marcos_placona
@marcos_placona
~100 Lines
~350 Lines
~750 Lines
@marcos_placona
@marcos_placona
github.com/mplacona
marcos@twilio.com
Developer Evangelist @ Twilio
Questions?

More Related Content

What's hot

Unit testing on Android (Droidcon Dubai 2015)
Unit testing on Android (Droidcon Dubai 2015)Unit testing on Android (Droidcon Dubai 2015)
Unit testing on Android (Droidcon Dubai 2015)Danny Preussler
 
Jersey framework
Jersey frameworkJersey framework
Jersey frameworkknight1128
 
33rd Degree 2013, Bad Tests, Good Tests
33rd Degree 2013, Bad Tests, Good Tests33rd Degree 2013, Bad Tests, Good Tests
33rd Degree 2013, Bad Tests, Good TestsTomek Kaczanowski
 
Unit testing with PHPUnit - there's life outside of TDD
Unit testing with PHPUnit - there's life outside of TDDUnit testing with PHPUnit - there's life outside of TDD
Unit testing with PHPUnit - there's life outside of TDDPaweł Michalik
 
Inside PyMongo - MongoNYC
Inside PyMongo - MongoNYCInside PyMongo - MongoNYC
Inside PyMongo - MongoNYCMike Dirolf
 
Unit testing PHP apps with PHPUnit
Unit testing PHP apps with PHPUnitUnit testing PHP apps with PHPUnit
Unit testing PHP apps with PHPUnitMichelangelo van Dam
 
TDD CrashCourse Part5: Testing Techniques
TDD CrashCourse Part5: Testing TechniquesTDD CrashCourse Part5: Testing Techniques
TDD CrashCourse Part5: Testing TechniquesDavid Rodenas
 
Introduction to Unit Testing with PHPUnit
Introduction to Unit Testing with PHPUnitIntroduction to Unit Testing with PHPUnit
Introduction to Unit Testing with PHPUnitMichelangelo van Dam
 
Pyconie 2012
Pyconie 2012Pyconie 2012
Pyconie 2012Yaqi Zhao
 
Introduction to web programming for java and c# programmers by @drpicox
Introduction to web programming for java and c# programmers by @drpicoxIntroduction to web programming for java and c# programmers by @drpicox
Introduction to web programming for java and c# programmers by @drpicoxDavid Rodenas
 
2012 JDays Bad Tests Good Tests
2012 JDays Bad Tests Good Tests2012 JDays Bad Tests Good Tests
2012 JDays Bad Tests Good TestsTomek Kaczanowski
 
Midiendo la calidad de código en WTF/Min (Revisado EUI Abril 2014)
Midiendo la calidad de código en WTF/Min (Revisado EUI Abril 2014)Midiendo la calidad de código en WTF/Min (Revisado EUI Abril 2014)
Midiendo la calidad de código en WTF/Min (Revisado EUI Abril 2014)David Gómez García
 
Clean code via dependency injection + guice
Clean code via dependency injection + guiceClean code via dependency injection + guice
Clean code via dependency injection + guiceJordi Gerona
 

What's hot (20)

groovy & grails - lecture 7
groovy & grails - lecture 7groovy & grails - lecture 7
groovy & grails - lecture 7
 
Unit testing on Android (Droidcon Dubai 2015)
Unit testing on Android (Droidcon Dubai 2015)Unit testing on Android (Droidcon Dubai 2015)
Unit testing on Android (Droidcon Dubai 2015)
 
Jersey framework
Jersey frameworkJersey framework
Jersey framework
 
33rd Degree 2013, Bad Tests, Good Tests
33rd Degree 2013, Bad Tests, Good Tests33rd Degree 2013, Bad Tests, Good Tests
33rd Degree 2013, Bad Tests, Good Tests
 
Introduzione al TDD
Introduzione al TDDIntroduzione al TDD
Introduzione al TDD
 
Unit testing with PHPUnit - there's life outside of TDD
Unit testing with PHPUnit - there's life outside of TDDUnit testing with PHPUnit - there's life outside of TDD
Unit testing with PHPUnit - there's life outside of TDD
 
Inside PyMongo - MongoNYC
Inside PyMongo - MongoNYCInside PyMongo - MongoNYC
Inside PyMongo - MongoNYC
 
guice-servlet
guice-servletguice-servlet
guice-servlet
 
Unit testing PHP apps with PHPUnit
Unit testing PHP apps with PHPUnitUnit testing PHP apps with PHPUnit
Unit testing PHP apps with PHPUnit
 
TDD CrashCourse Part5: Testing Techniques
TDD CrashCourse Part5: Testing TechniquesTDD CrashCourse Part5: Testing Techniques
TDD CrashCourse Part5: Testing Techniques
 
Spock
SpockSpock
Spock
 
Introduction to Unit Testing with PHPUnit
Introduction to Unit Testing with PHPUnitIntroduction to Unit Testing with PHPUnit
Introduction to Unit Testing with PHPUnit
 
Pyconie 2012
Pyconie 2012Pyconie 2012
Pyconie 2012
 
Introduction to web programming for java and c# programmers by @drpicox
Introduction to web programming for java and c# programmers by @drpicoxIntroduction to web programming for java and c# programmers by @drpicox
Introduction to web programming for java and c# programmers by @drpicox
 
2012 JDays Bad Tests Good Tests
2012 JDays Bad Tests Good Tests2012 JDays Bad Tests Good Tests
2012 JDays Bad Tests Good Tests
 
Celery
CeleryCelery
Celery
 
PHPUnit testing to Zend_Test
PHPUnit testing to Zend_TestPHPUnit testing to Zend_Test
PHPUnit testing to Zend_Test
 
Agile Android
Agile AndroidAgile Android
Agile Android
 
Midiendo la calidad de código en WTF/Min (Revisado EUI Abril 2014)
Midiendo la calidad de código en WTF/Min (Revisado EUI Abril 2014)Midiendo la calidad de código en WTF/Min (Revisado EUI Abril 2014)
Midiendo la calidad de código en WTF/Min (Revisado EUI Abril 2014)
 
Clean code via dependency injection + guice
Clean code via dependency injection + guiceClean code via dependency injection + guice
Clean code via dependency injection + guice
 

Viewers also liked

Little Helpers for Android Development with Kotlin
Little Helpers for Android Development with KotlinLittle Helpers for Android Development with Kotlin
Little Helpers for Android Development with KotlinKai Koenig
 
Add ClassyShark to your Android toolbox
Add ClassyShark to your Android toolboxAdd ClassyShark to your Android toolbox
Add ClassyShark to your Android toolboxBoris Farber
 
A realtime infrastructure for Android apps: Firebase may be what you need..an...
A realtime infrastructure for Android apps: Firebase may be what you need..an...A realtime infrastructure for Android apps: Firebase may be what you need..an...
A realtime infrastructure for Android apps: Firebase may be what you need..an...Alessandro Martellucci
 
프로그래밍 대회: C++11 이야기
프로그래밍 대회: C++11 이야기프로그래밍 대회: C++11 이야기
프로그래밍 대회: C++11 이야기Jongwook Choi
 
MVVM and RxJava – the perfect mix
MVVM and RxJava – the perfect mixMVVM and RxJava – the perfect mix
MVVM and RxJava – the perfect mixFlorina Muntenescu
 
2016 FunctionCup 풀이
2016 FunctionCup 풀이2016 FunctionCup 풀이
2016 FunctionCup 풀이geunwoo bae
 
Mastering the NDK with Android Studio 2.0 and the gradle-experimental plugin
Mastering the NDK with Android Studio 2.0 and the gradle-experimental pluginMastering the NDK with Android Studio 2.0 and the gradle-experimental plugin
Mastering the NDK with Android Studio 2.0 and the gradle-experimental pluginXavier Hallade
 

Viewers also liked (7)

Little Helpers for Android Development with Kotlin
Little Helpers for Android Development with KotlinLittle Helpers for Android Development with Kotlin
Little Helpers for Android Development with Kotlin
 
Add ClassyShark to your Android toolbox
Add ClassyShark to your Android toolboxAdd ClassyShark to your Android toolbox
Add ClassyShark to your Android toolbox
 
A realtime infrastructure for Android apps: Firebase may be what you need..an...
A realtime infrastructure for Android apps: Firebase may be what you need..an...A realtime infrastructure for Android apps: Firebase may be what you need..an...
A realtime infrastructure for Android apps: Firebase may be what you need..an...
 
프로그래밍 대회: C++11 이야기
프로그래밍 대회: C++11 이야기프로그래밍 대회: C++11 이야기
프로그래밍 대회: C++11 이야기
 
MVVM and RxJava – the perfect mix
MVVM and RxJava – the perfect mixMVVM and RxJava – the perfect mix
MVVM and RxJava – the perfect mix
 
2016 FunctionCup 풀이
2016 FunctionCup 풀이2016 FunctionCup 풀이
2016 FunctionCup 풀이
 
Mastering the NDK with Android Studio 2.0 and the gradle-experimental plugin
Mastering the NDK with Android Studio 2.0 and the gradle-experimental pluginMastering the NDK with Android Studio 2.0 and the gradle-experimental plugin
Mastering the NDK with Android Studio 2.0 and the gradle-experimental plugin
 

Similar to Contextual communications and why you should care - Droidcon DE

Contextual communications and why you should care - Devtalks Cluj
Contextual communications and why you should care - Devtalks ClujContextual communications and why you should care - Devtalks Cluj
Contextual communications and why you should care - Devtalks ClujMarcos Placona
 
Stop pushing users away! - #DroidconZG
Stop pushing users away! - #DroidconZGStop pushing users away! - #DroidconZG
Stop pushing users away! - #DroidconZGMarcos Placona
 
Contextual communications and why should you care
Contextual communications and why should you careContextual communications and why should you care
Contextual communications and why should you careMarcos Placona
 
PhoneGap, Backbone & Javascript
PhoneGap, Backbone & JavascriptPhoneGap, Backbone & Javascript
PhoneGap, Backbone & Javascriptnatematias
 
Getting your app ready for android n
Getting your app ready for android nGetting your app ready for android n
Getting your app ready for android nSercan Yusuf
 
The Hitchhicker’s Guide to Windows Azure Mobile Services | FalafelCON 2014
The Hitchhicker’s Guide to Windows Azure Mobile Services | FalafelCON 2014The Hitchhicker’s Guide to Windows Azure Mobile Services | FalafelCON 2014
The Hitchhicker’s Guide to Windows Azure Mobile Services | FalafelCON 2014FalafelSoftware
 
Voyage en monde Android. Trucs et astuces tout au long de la route.
Voyage en monde Android. Trucs et astuces tout au long de la route.Voyage en monde Android. Trucs et astuces tout au long de la route.
Voyage en monde Android. Trucs et astuces tout au long de la route.Mathias Seguy
 
10 tips for porting to Windows Phone 8
10 tips for porting to Windows Phone 810 tips for porting to Windows Phone 8
10 tips for porting to Windows Phone 8Matt Lacey
 
Building a Better Call Center with Telephony APIs, SugarCRM, and WebRTC
Building a Better Call Center with Telephony APIs, SugarCRM, and WebRTCBuilding a Better Call Center with Telephony APIs, SugarCRM, and WebRTC
Building a Better Call Center with Telephony APIs, SugarCRM, and WebRTCSugarCRM
 
Tips & tricks for sharing C# code on iOS, Android and Windows Phone by Jaime ...
Tips & tricks for sharing C# code on iOS, Android and Windows Phone by Jaime ...Tips & tricks for sharing C# code on iOS, Android and Windows Phone by Jaime ...
Tips & tricks for sharing C# code on iOS, Android and Windows Phone by Jaime ....NET Conf UY
 
How we integrate & deploy Mobile Apps with Travis CI
How we integrate & deploy Mobile Apps with Travis CIHow we integrate & deploy Mobile Apps with Travis CI
How we integrate & deploy Mobile Apps with Travis CIMarcio Klepacz
 
Easy logins for JavaScript web applications
Easy logins for JavaScript web applicationsEasy logins for JavaScript web applications
Easy logins for JavaScript web applicationsFrancois Marier
 
Windows Apps | London Meetup
Windows Apps | London MeetupWindows Apps | London Meetup
Windows Apps | London MeetupXpand IT
 
Phone gap android plugins
Phone gap android pluginsPhone gap android plugins
Phone gap android pluginsSimon MacDonald
 
android level 3
android level 3android level 3
android level 3DevMix
 
Introduction to the Salesforce Mobile SDK for Android
Introduction to the Salesforce Mobile SDK for AndroidIntroduction to the Salesforce Mobile SDK for Android
Introduction to the Salesforce Mobile SDK for AndroidSalesforce Developers
 

Similar to Contextual communications and why you should care - Droidcon DE (20)

Contextual communications and why you should care - Devtalks Cluj
Contextual communications and why you should care - Devtalks ClujContextual communications and why you should care - Devtalks Cluj
Contextual communications and why you should care - Devtalks Cluj
 
Stop pushing users away! - #DroidconZG
Stop pushing users away! - #DroidconZGStop pushing users away! - #DroidconZG
Stop pushing users away! - #DroidconZG
 
Contextual communications and why should you care
Contextual communications and why should you careContextual communications and why should you care
Contextual communications and why should you care
 
Android workshop
Android workshopAndroid workshop
Android workshop
 
PhoneGap, Backbone & Javascript
PhoneGap, Backbone & JavascriptPhoneGap, Backbone & Javascript
PhoneGap, Backbone & Javascript
 
Getting your app ready for android n
Getting your app ready for android nGetting your app ready for android n
Getting your app ready for android n
 
The Hitchhicker’s Guide to Windows Azure Mobile Services | FalafelCON 2014
The Hitchhicker’s Guide to Windows Azure Mobile Services | FalafelCON 2014The Hitchhicker’s Guide to Windows Azure Mobile Services | FalafelCON 2014
The Hitchhicker’s Guide to Windows Azure Mobile Services | FalafelCON 2014
 
Voyage en monde Android. Trucs et astuces tout au long de la route.
Voyage en monde Android. Trucs et astuces tout au long de la route.Voyage en monde Android. Trucs et astuces tout au long de la route.
Voyage en monde Android. Trucs et astuces tout au long de la route.
 
10 tips for porting to Windows Phone 8
10 tips for porting to Windows Phone 810 tips for porting to Windows Phone 8
10 tips for porting to Windows Phone 8
 
Building a Better Call Center with Telephony APIs, SugarCRM, and WebRTC
Building a Better Call Center with Telephony APIs, SugarCRM, and WebRTCBuilding a Better Call Center with Telephony APIs, SugarCRM, and WebRTC
Building a Better Call Center with Telephony APIs, SugarCRM, and WebRTC
 
Tips & tricks for sharing C# code on iOS, Android and Windows Phone by Jaime ...
Tips & tricks for sharing C# code on iOS, Android and Windows Phone by Jaime ...Tips & tricks for sharing C# code on iOS, Android and Windows Phone by Jaime ...
Tips & tricks for sharing C# code on iOS, Android and Windows Phone by Jaime ...
 
2. xamarin.android 2.2 hello xamarin android 구조 2.2.7 simple intent example(현...
2. xamarin.android 2.2 hello xamarin android 구조 2.2.7 simple intent example(현...2. xamarin.android 2.2 hello xamarin android 구조 2.2.7 simple intent example(현...
2. xamarin.android 2.2 hello xamarin android 구조 2.2.7 simple intent example(현...
 
How we integrate & deploy Mobile Apps with Travis CI
How we integrate & deploy Mobile Apps with Travis CIHow we integrate & deploy Mobile Apps with Travis CI
How we integrate & deploy Mobile Apps with Travis CI
 
JavaScript Refactoring
JavaScript RefactoringJavaScript Refactoring
JavaScript Refactoring
 
Easy logins for JavaScript web applications
Easy logins for JavaScript web applicationsEasy logins for JavaScript web applications
Easy logins for JavaScript web applications
 
Windows Apps | London Meetup
Windows Apps | London MeetupWindows Apps | London Meetup
Windows Apps | London Meetup
 
Your First Adobe Flash Application for Android
Your First Adobe Flash Application for AndroidYour First Adobe Flash Application for Android
Your First Adobe Flash Application for Android
 
Phone gap android plugins
Phone gap android pluginsPhone gap android plugins
Phone gap android plugins
 
android level 3
android level 3android level 3
android level 3
 
Introduction to the Salesforce Mobile SDK for Android
Introduction to the Salesforce Mobile SDK for AndroidIntroduction to the Salesforce Mobile SDK for Android
Introduction to the Salesforce Mobile SDK for Android
 

Contextual communications and why you should care - Droidcon DE