Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Introduction to Android wearable by Volodymyr Falendysh

GDG Ternopil
September 15, 2015

Introduction to Android wearable by Volodymyr Falendysh

Introduction to Android wearable by Volodymyr Falendysh

GDG Ternopil

September 15, 2015
Tweet

More Decks by GDG Ternopil

Other Decks in Programming

Transcript

  1. Обмеження, обмеження, обмеження… Не працюють бібліотеки : android.webkit android.print android.app.backup

    android.appwidget android.hardware.usb Немає звичних кнопок Немає вводу тексту з клавіатури
  2. А що ж можна ?.. Suggest: The Context Stream Demand:

    The Cue Card Нагадування, повідомлення актуальні на даний час Гортаються вертикально. OK Google ! + Голосова команда або вибір з меню дотиком
  3. App Structure for Android Wear: we strongly recommend not building

    apps the user has to launch and quit before thinking really hard about how you could react to a specific location, activity, time of day, or something happening in the cloud. Contextual card in the stream: Bridged notifications, such as new message notifications, are pushed to the wearable from the connected handheld using standard Android notifications. Contextual notifications, such as an exercise card that appears when you begin running, are generated locally on the wearable and appear at contextually relevant moments. Full screen UI app: 2D Picker is a design pattern that allows the user to select from a set of items, such as to select an artist then an album. Custom layouts are also possible where apps need to extend beyond the basic card/stream metaphor, such as to present a graph or map. Keep your app always-on if you have information that refreshes or stays relevant, without draining the battery.
  4. import android.support.v4.app.NotificationCompat; import android.support.v4.app.NotificationManagerCompat; import android.support.v4.app.NotificationCompat.WearableExtender; ... int notificationId =

    001; String eventTitle = new String(“ Заголовок повідомлення”); String eventMessage = new String(“Текст повідомлення”); Intent viewIntent = new Intent(this, ViewEventActivity.class); viewIntent.putExtra(EXTRA_EVENT_ID, eventId); PendingIntent viewPendingIntent = PendingIntent.getActivity(this, 0, viewIntent, 0); NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this) .setSmallIcon(R.drawable.ic_event) .setContentTitle(eventTitle) .setContentText(eventMessage) .setContentIntent(viewPendingIntent); NotificationManagerCompat notificationManager = NotificationManagerCompat.from(this); notificationManager.notify(notificationId, notificationBuilder.build()); Створення повідомлень (Notification)
  5. Think about stream cards first Do one thing, really fast

    Design for the corner of the eye Don’t be a constant shoulder tapper The best experience on a wearable device is when the right content is there just when the user needs it.