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

Developing with Android Wear - next must have g...

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

Devavrata Sharma

August 01, 2016
Tweet

Other Decks in Programming

Transcript

  1. 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. 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. 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. 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
  5. App development for Android wear - Showing notifications - Extending

    actions only for wearable - Android wear specific app
  6. 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());
  7. 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);
  8. 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()));
  9. 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') • }
  10. -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.
  11. 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.
  12. Dont’s - Do not overload operation for wear apps -

    Do not demand unnecessary data from handheld devices - Stay careful about interactive and ambient mode
  13. Android Wear 2.0 preview - System UI - Standalone Apps

    - Real Time walking, bicycling and Running recognition.
  14. System UI: - Material design for wearable - Darker UI

    - Watch hardware button works like a back button - You can reply by voice, emojis and keyboard
  15. 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
  16. Q&A