Search code examples
google-glassgoogle-gdk

Publishing apps for glass


I'm finishing the development an application for Glass that will have an Immersion mode (native app) and will publish cards to the user timeline, and it's now time to publish to the store.

Most of the Glassware that currently exists work in one of the following ways, after the using sets the toggle to ON: a) App is installed and the users remains on that page (Example: Stopwatch); b) You are redirected to an authentication page where you can set some preferences of the content that will be pushed to your timeline (Example: CNN);

I wanted to know if it's possible to do both at the same time. So basically the user would set the toggle to ON and the app was installed, but the users were redirected to my oauth page and set their content preferences.


Solution

  • Yes, this is possible — in fact, this is how authentication works for GDK applications.

    When you submit your Glassware, provide an authentication URL that the user will be redirected to when they install your Glassware; the APK will be downloaded simultaneously as they are redirected. From that URL, you can have them fill out a form to log in to your service and set their preferences, and you push a bundle of data back to the Mirror API's accounts endpoint that creates the account on their device that you can access through AccountManager and use to retrieve their settings later.