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

Extending your apps to wearables

Extending your apps to wearables

Learn how to take advantage from wearables? In this talk and learn how easily add support for Android Wear and Sony Smart Extension devices to your existing application. Besides that we'll talk about UI/UX on small screen, project structure best practices and finally decide what platform is more perspective and easier to work with from developer point of view.

Vitaliy Zasadnyy

September 06, 2014
Tweet

More Decks by Vitaliy Zasadnyy

Other Decks in Programming

Transcript

  1. Requirements • Eclipse / Android Studio • ADT • Sony

    Add-on SDK • Smart Connect • Host Application
  2. Bundle bundle1 = new Bundle(); bundle1.putInt(Control. Intents.EXTRA_LAYOUT_REFERENCE, R.id.exercise_name); bundle1.putString(Control.Intents.EXTRA_TEXT, name);

    Bundle bundle2 = new Bundle(); bundle2.putInt(Control. Intents.EXTRA_LAYOUT_REFERENCE, R.id.exercise_number); bundle2.putString(Control.Intents.EXTRA_TEXT, number); Bundle bundle3 = new Bundle(); bundle3.putInt(Control. Intents.EXTRA_LAYOUT_REFERENCE, R.id.exercise_timer); bundle3.putString(Control.Intents.EXTRA_TEXT, UiUtils. formatTimeLeft(timeLeft)); Bundle[] bundleData = new Bundle[5]; bundleData[0] = bundle1; bundleData[1] = bundle2; bundleData[2] = bundle3; showLayout(R.layout.exercise_screen, bundleData); Using API - HELL
  3. Things to consider • Resolution: 128x128 or 220x176 • Information

    levels • Dimmed mode design • Icon sizes, buttons …
  4. Publishing 1. Package as plain Android app 2. Upload to

    store 3. Add to description: “Smart Connect extension for SmartWatch 2”
  5. Wear Apps Android 4.4W Bluetooth Outer World somehow Awesome App

    Intents Play Store .apk wearable .apk Android Wear Play Services Data API Node API Message API wearable.apk
  6. Full-Screen Activities Wearable UI Library: • CircledImageView • WearableListView •

    CardFragment • ConfirmationActivity • GridViewPager • WatchViewStub
  7. Debugging • Direct connect ◦ use micro-usb cable and connect

    the device • Via Bluetooth ◦ enable debugging on phone & wearable ◦ enable Bluetooth debugging on wearable ◦ adb forward tcp:4444 localabstract:/adb-hub; adb connect localhost:4444
  8. Packaging dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.google.android.gms:play-services:5.0.+@aar'

    compile 'com.android.support:support-v4:20.0.+'' wearApp project(':wear') } build.gradle