Contextual communications and why you should care - Droidcon DE

42

Transcript of Contextual communications and why you should care - Droidcon DE

STOP

PUSHING

USERS

AWAY!

Contextual communications and why you should care

<Say>Hello #DroidconDE!</Say>

[email protected] 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/[email protected] Evangelist @ Twilio

Questions?