Developing with Android Wear - next must have gadget

Developing with Android Wear - next must have gadget

Get to know
- What is Android Wear
- How to start developing for Android wear
- Breach the Un-breachable with Android wear V2.0 preview

C40e086420fe44e1112d2aa17d836386?s=128

Devavrata Sharma

August 01, 2016
Tweet

Transcript

  1. 2.

    Agenda : - Introduction - Walkthrough with Android wear -

    Setup the environment - Development for Android wear - Packaging of the app for publishing - Do’s and Don’ts - What all new in Android wear 2.0 - Q&A
  2. 3.

    Introduction - Emerging market of wear technology and devices with

    $8 billion and more - Concentrated traffic from Notifications - Helps you to do better time management.
  3. 5.

    Walkthrough with Android wear - Android wear design Majors -

    How the wear app gets installed on you the device. -How to interact with Android wear device -Swipe gestures -Voice commands
  4. 8.
  5. 9.
  6. 10.

    Setup the Environment -Update your SDK tools to version 23.0.0

    or higher - Update your SDK with Android 4.4W.2 (API 20) or higher - Setup an Android wear virtual device or Android wear device - Download Android wear app from Play store on your phone - Command to connect phone with Android wear virtual device adb -d forward tcp:5601 tcp:5601
  7. 11.

    App development for Android wear - Showing notifications - Extending

    actions only for wearable - Android wear specific app
  8. 12.

    Notifications : final int notificationId = 1; final NotificationCompat.Builder notificationBuilder

    = new NotificationCompat.Builder(this) .setSmallIcon(R.mipmap.ic_launcher) .setContentTitle("Hello Wearable!") .setContentText("Sample text"); NotificationManagerCompat.from(context).notify(notificationId,notificationBuilder.build());
  9. 15.

    Wearable only actions: final NotificationCompat.WearableExtender wearableExtender = new NotificationCompat.WearableExtender(); wearableExtender.addAction(new

    NotificationCompat.Action(R.drawable. ic_navigation,"Nearest Shop", navigationIntent)); notificationBuilder.extend(wearableExtender);
  10. 16.
  11. 17.

    Voice Commands: final RemoteInput remoteInput = new RemoteInput.Builder (EXTRA_VOICE_REPLY).setLabel("Pls give

    feedback").setChoices(this. getResources().getStringArray(R.array.reply_choices)).build(); notificationBuilder.extend(new NotificationCompat.WearableExtender(). addAction(new NotificationCompat.Action.Builder(R.drawable. ic_voice_search,"Reply", navigationIntent).addRemoteInput(remoteInput). build()));
  12. 18.
  13. 20.

    Packaging of the App for Publishing • You need to

    package wearable app inside handheld app • You should give dependency of wearable app inside mobile’s app build.gradle file • dependencies { • MyFirstWearApp project(':wearable') • }
  14. 21.

    -Include all the permission declared in the wearable manifest file

    to mobile module manifest file. - Ensure common version number and package name for both modules.
  15. 22.

    Do’s - Design for big gestures - Design it in

    a way, so that user should not take more than 5 seconds to use. Otherwise you should reconsider the design. - Do one thing at a time. - Keep the long running logic on your mobile side.
  16. 23.

    Dont’s - Do not overload operation for wear apps -

    Do not demand unnecessary data from handheld devices - Stay careful about interactive and ambient mode
  17. 24.

    Android Wear 2.0 preview - System UI - Standalone Apps

    - Real Time walking, bicycling and Running recognition.
  18. 25.

    System UI: - Material design for wearable - Darker UI

    - Watch hardware button works like a back button - You can reply by voice, emojis and keyboard
  19. 26.

    Standalone Apps : - Tethered + Untethered - Apps run

    on watch even when your phone is not with you - Doze - Handle notifications completely from wearable device. - Direct download from play store
  20. 29.

    Q&A

  21. 31.