Development tips

On this page, you can find helpful tips distilled from our years of application development for Glass Enterprise Edition 2. We cover the following points so that you can have them in mind when you develop your own applications:

Avoid unresponsive UI elements

Don't use standard Android elements such as buttons, check boxes, and input text areas. These elements are treated by Glass as being unresponsive. Focus on the “one action per page” principle when you design the UI of your application.

If you need to use buttons, treat the entire page as a button.

If you need lists to show some content, use a standard recyclerView.

If you need to interact with elements of a list, Implement swipe views. Use the viewPager class to achieve this.

Hide the status and action bar

The status bar can show some helpful information, such as your connectivity status or the clock, but if this kind of information isn't crucial for the task at hand, feel free to hide the status and action bar. The user can always swipe down from the top edge of the screen to bring it back momentarily.

Make it full screen

To improve the user's experience, consider making your application full screen. This allows users to navigate through your application easier and increases the visible area that you can use to display content.

USB cable

We recommend that you use the USB-C™ cable that came with your device since it's required for fast charging. Other USB-C™ cables might work in a suboptimal way. If you do use a third party USB-C™ cable or power adapter, make sure it's enabled to transfer data and charge devices.