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

Android Wear 2.0: что делать?

GDG SPb
September 30, 2017

Android Wear 2.0: что делать?

Выпустили поддержку часов в бородатом 2014м? А к 15-му году забыли вообще об их существовании? Смутно слышали про перезапуск и новую систему, но понятия не имеете как к этому относиться?
В докладе постараюсь осветить, что поменялось в новой системе с трёх сторон: для пользователя, для разработчика и для продактов. Что можно делать, какие есть подводные камни, как правильно выстроить поддержку продукта на Wear и когда стоит ей вообще заниматься.

GDG SPb

September 30, 2017
Tweet

More Decks by GDG SPb

Other Decks in Programming

Transcript

  1. Features Wear 2.0 • Standalone apps + Play Store •

    Variety of Input methods • Material design concept! • New Notifications design: • ore o pa t desig • easy to ie
  2. Market share Q1 2017 • Moto 360 discontinued for low

    demand • Tizen offers better UX • No Nexus-alike leader • Huawei's CEO Eric Xu Zhijun: "I am always confused as to what smartwatches are for when we have smartphones."
  3. Current state • Luxury brands • Wear 2.0&standalone apps •

    Fitness&tracking (NB, Casio) • Battle for the future&past 
  4. Pre-requisites • Wear 1.0 since September 2014 • Three major

    updates to address API changes&improvements without UI changes • Wear 2.0 beta with new design since March: • Complications • Standalone app • Google Auth • Wear 2.0 remastered: • Sync flow within data layer • Watchface
  5. Multi-APK delivery • Wear 1 application that delivered with base

    APK. • Wear 2 delivered on a Multi-APK basis: • Different version name&code for each APK • At some poi t so ethi g e t ro g…
  6. Multi-APK delivery • Wear 1 application that delivered with base

    APK. • Wear 2 delivered on a Multi-APK basis BUT: Wear 2 version code > Base APK version code Otherwise we would have a mess with delivery to different Watches
  7. Black Thursday By 18th of January, 2018 wear badge will

    disappear for : • Mobile apps that support Wear notification enhancements but do not have a separate Wear app. • Wear apps that are bundled with mobile apps instead of using multi-APK. • You need to have standalone app (working on both iOS&Android-paired phones) But in the documentation we can see:
  8. Black Thursday Since multi-APK is now supported by devices running

    Wear 1.0 and 2.0, developers embedding their Wear app APKs in phone APKs should unbundle their Wear APK and upload it to the Play Store as a multi- APK. – Android Developers Blog If you build a standalone Wear 2.0 APK and will continue to have a Wear 1.0 APK, please do both of the following: • Provide a standalone version of the Wear APK, and • Continue embedding a version of the Wear APK in your phone APK – Android Developers website
  9. Possible issues • When you remove embedded Wear 1 APK

    from your devices – everybody would loose the app and the data after an update • You’ll loose per issio s • BLE internet access limited to 4 kilobytes per second • Wi-Fi seriously broken on some devices
  10. What’s provided • Excessive network Guide • Capability API •

    Various Auth guides • Voice actions • China developers manual
  11. Voice • 10 default action intents • De lari g

    la el i a ti ity allo s Start o a d, e.g. start gdg north: • Free-form speech input recognition <activity android:name="StartRunActivity" android:label=“GDG North">
  12. Network • Network guide quite complicated • Volley is good

    enough too • Scheduling with Constraints (JobScheduler) • FCM flow is the same
  13. Oauth 2.0 1. The user performs an action with the

    third-party app, requiring authorization. 2. The third-party app sends a request to the Android Wear companion app using the Wear services API, sendAuthorizationRequest(), to open a web view with the authorization URL. 3. The URL website authorizes the user (asks the user for a username, password, perhaps does some two- factor authentication, etc.). 4. After a successful or failed authorization, the site invokes the callback URL (to the app's backend server) specified in the request with the auth code. 5. The backend server exchanges the auth code for access and refresh tokens from the OAuth server. 6. The backend server then redirects the response to go to the third-party watch app via the Android Wear companion app. 7. The Android Wear companion app receives that redirect and uses the Wearable support API, onAuthorizationResponse(), to send the entire response from the server back to the watch app. 8. The third-party app parses the response from the auth site and extracts an auth token from the response. 9. The third-party app uses the auth token as a credential in its future requests.
  14. Who might be interested • Business auditory (e.g. frequent flyers)

    • Health tracking apps • Lifestyle management (calendars todo-lists) • Personalization apps • OpenGL ports*