make your existing app android wear compatible

23
Android Wear Yep, it is wearable anymore!

Upload: orhun-mert-simsek

Post on 28-Jul-2015

328 views

Category:

Mobile


0 download

TRANSCRIPT

Page 1: Make Your Existing App Android Wear Compatible

Android WearYep, it is wearable anymore!

Page 2: Make Your Existing App Android Wear Compatible

Who am I?

Co-Founder / CEO of

Android&iOS Developer

Member of GDG Ankara

Android Evangelist

Page 3: Make Your Existing App Android Wear Compatible

ADD ‘15

Page 4: Make Your Existing App Android Wear Compatible
Page 5: Make Your Existing App Android Wear Compatible
Page 6: Make Your Existing App Android Wear Compatible
Page 7: Make Your Existing App Android Wear Compatible

Wearables are

EverywhereYou can catch the trend

with Android Wear!

It is easy to implement

Page 8: Make Your Existing App Android Wear Compatible

Notifications

Page 9: Make Your Existing App Android Wear Compatible

If you send your notifications to your app, it appears on Wear, too!

Only if you use NotificationCompat class

Page 10: Make Your Existing App Android Wear Compatible

Example

pI = PendingIntent.getActivity(this, 0, new Intent(this,MainActivity.class), 0);pIExtra = PendingIntent.getActivity(this, 0, new Intent(Intent.ACTION_DIAL),0);

Page 11: Make Your Existing App Android Wear Compatible

Example

NotificationCompat.Action action = new NotificationCompat.Action.Builder(android.R.drawable.ic_btn_speak_now, "Reply!",pIExtra).build();

Page 12: Make Your Existing App Android Wear Compatible

Example

NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this) .setSmallIcon(R.mipmap.ic_launcher) .setContentTitle("TEST") .setContentText("Test Mesasge!") .extend(new NotificationCompat.WearableExtender().addAction(action));

mBuilder.setContentIntent(pI);mBuilder.setDefaults(Notification.DEFAULT_SOUND);mBuilder.setAutoCancel(true);NotificationManager mNotificationManager = (NotificationManager)this.getSystemService(Context.NOTIFICATION_SERVICE);mNotificationManager.notify(1, mBuilder.build());

Page 13: Make Your Existing App Android Wear Compatible

Example

It will be shown on the handset as usual.

But if an Android Wear is connected to the handset, it will be look like this! >

Page 14: Make Your Existing App Android Wear Compatible
Page 15: Make Your Existing App Android Wear Compatible
Page 16: Make Your Existing App Android Wear Compatible

Android Wear Apps

Page 17: Make Your Existing App Android Wear Compatible
Page 18: Make Your Existing App Android Wear Compatible
Page 19: Make Your Existing App Android Wear Compatible

EVEN

Page 20: Make Your Existing App Android Wear Compatible

Setting Up!

Page 21: Make Your Existing App Android Wear Compatible

Wear Emulator&

Android DeviceCreate an Android Wear emulator

Install Android Wear app to your phone

Connect your phone to your computer

Open up Terminal and make the port forwarding via this command: adb -d forward tcp:5601 tcp:5601

Run the Android Wear Emulator and select “pair with emulator” option from Android Wear app

Page 22: Make Your Existing App Android Wear Compatible

It is DONE!You can start to develop for Android Wear, now!

A little DEMO! :)

Page 23: Make Your Existing App Android Wear Compatible

Thank You!Let’s keep in touch@orhunmertsimsek

[email protected]