May 1, I finally got my own Google Glass. Most of the developers who own it have started to develop their own software, almost every day with dedicated new software releases. However, there are probably only hundreds of Google Glass in the world, and many friends who are interested in development do not have first-hand information, and here I will share its interface, development style, language, tools and how they interact.
Usage and development Impressions
At present, Google Glass only support English. Speech recognition is very accurate for some everyday language, but some abbreviations or new words, Google glass most unrecognized. Its screen resolution is not high (the operating interface parameters are shown in table 1), and is not particularly clear under strong light. The position of the screen is in the upper-right corner of the eye, just within sight, without obscuring the view. The battery can last for a day in general, but if you keep taking pictures or videos, you can only stick around for 3-4 hours. Google has set out to design myopic glasses, and will soon be able to release frames for it or just a Google Glass that can be clipped to a common frame.
The development of Google Glass software is similar to the development of mobile browser software, but can not use JavaScript, all information needs to be processed by the server by Google's server, so much information is not on the local device. For example, when developing social software, we can't get the user's contact data directly from the glasses, but we need to get it by calling Google + or other social software interfaces, but traditional mobile app developers can read the information directly from the phone book.
Operation interface
While the Android operating system is running, Google Glass has a completely new operating interface that, without escaping, developers can only develop on Google's application interface. Google has started to develop a toolkit (GDK) that allows eyeglasses to run offline and hardware development, but for now, developers can only make Google Glass as a simple interactive display.
Table 1 Operating interface parameters for Google Glass
Developers can allow glasses to display higher-pixel images or videos, but these too many pixels can only waste traffic and slow down the software.
Google Glass's operating interface is very simple, very similar to the slides we normally use. Google calls it a "timeline" (Timeline). On the timeline, users can see the home page with time, the software they subscribe to, and the device settings. Each timeline's page is called a card, and the application can update the card or send a new card to the user. Each time axis card can have different functions, such as reply and sound reading. Recently, Google Glass also added a live video broadcast function.
Figure 1 Timeline, where each page is a card
Development mode
Google Glass's development approach is very similar to the traditional web development. Content transfer uses rest, JSON, so all applications that use these APIs can be implemented very quickly in Google Glass-apps first send information to Google Glass APIs and then update the operating interface of the glasses.
Fig. 2 Application flow of SMS software
The card content on each timeline is implemented using XML and CSS, which enables you to insert a picture, change the font color, and so on. For example, if we want to display a picture in the operating interface, we can send code to the eyeglasses interface:
All HTML can be beautified with CSS, such as the table in Figure 3, using the "Text-small align-justify" format in the CSS implementation.
In this way, we can achieve the effect of Figure 3, the card code is as follows: