Develop native Google Glasses applications

Source: Internet
Author: User

When dealing with Google Glasses, Google has two available APIs/sdks in Developer Preview or quick-start version. The first is Google Glass's Mirror API, which is based on a RESTful interface that sends cards from a remote server to the timeline cloud of Google Glass. The second is the glasses Development Kit, which is built on the Android SDK to develop applications that run directly on glasses. These applications can also use Android NDK to collaborate with native code. Because it is built on the Android SDK, although it is not required for native application development, it does expose some excellent additional features.

Appmethod application development platform and RAD Studio development tools of inbakarino technology support Android Application Development, including applications that support native Google glasses. You can use your C ++ or Object Pascal programming language. This support is based on both Android SDK and NDK. Once the Android ADB driver of Google glasses is loaded, you can treat it like any other Android device. This article uses the RAD Studio development tool to cover all aspects of Google glasses. This example uses Object Pascal, which also involves RAD Studio. However, all the examples you can see here are also applicable to C ++, or some C ++ Builder and Delphi products use mobile additional packages ). Similarly, most examples can also work on Appmethod. You can follow the steps in this article to download a free 30-day license for RAD Studio or Appmethod.

Google Glasses description

In addition to being an Android device, Google Glass also means more. Essentially, it is a small tablet on your head. It has a dual-core ARM Cortex-A9 CPU that runs ARM v7 NEON indication, a camera, and a typical mobile device sensor. For the latest upgrade, it runs Android 4.4 KitKatAPI 19) system. It can run many native Android applications, but this is just the beginning.

The main output of glasses is the 640x360 display, which looks surprisingly good. Google claims to have a 8 feet screen at 25 inch points. It also has a bone conduction speaker and an optional headset for sound releasing. It has a lot of input sensors: microphone, accelerator, gyroscope, magnetic meter, and Compass), environmental light sensor, A wide-angle camera with a proximity sensor and a forward camera capable of capturing 5 million pixel photos or P videos. In addition, there is a touchpad for the right temple, a sensor for eye blinking detection, and a "Head Detection" sensor. The support for the latter two is still being tested.

Google Glass is not the first Android-powered optical head-mounted computer, but it may be the most innovative. Compared to the general input modules on other Android devices: a touch screen or keyboard, Google Glass's main input device uses a sound and a very small touch control panel near the right temple. This touchpad cannot be used to click a specific widget or application, but it usually provides four basic gestures: navigation forward and backward, selecting, or backward. If no other operations are performed, the rollback button will exit your application.

Google Glass's main user interface is a series of timeline concepts composed of cards. A click to wake up Google Glass. Moving left or right allows the timeline to move forward or backward. From the homepage card, click or use sound control to open the list of installed applications. When you start an installed application, the left-to-right navigation mode is usually used.

Figure 1-Google Glass homepage Screen

Install adb usb driver

Before developing Android applications on windows, you must install the adb usb driver. previously, Google Glass was more complicated. google Glass provides official support after the Google USB driver version 9th is released. you only need to runAndroid Tools(Installed with RAD Studio) the Android SDK management interface is displayed. Install the Google USB driver at the bottom of the Package list Extra.

Figure 2-Android SDK Management Interface

On the device management pageOther devicesYou can see an entry starting with a yellow triangle. This isGlass 1.You can find it in the installation directory of Android SDKExtras \ google \ usb_driverThe following example shows the default installation path after the Android SDK and RAD Studio are installed:

C: \ Users \ Public \ Documents \ Embarcadero \ Studio \ 14.0 \ PlatformSDKs \ adt-bundle-windows-x86-20131030 \ sdk \ extras \ google \ usb_driver

Create the first native Glassware App

RAD Studio can build a variety of applications across terminals, whether Android or iOS. due to the particularity of Glass, we assume that you are about to create the application. if you need to use it on multiple terminals, you can use the hybrid development technique.

RAD Studio provides a variety of templates for creating applications, starting with a blank application. This is also the entry point for most Glassware. Of course, the extensiveness of 3D applications is self-evident.

Figure 3-FireMonkey Mobile Application Wizard

Set IDE for Google Glasses

The actual resolution of the main display is 640x360, and its pixel density is 1.5. This means a control layout with a valid resolution of 472x240 (actual pixel divided by pixel density ). RAD Studio contains a precisely-sized device layout for Google Glass. You can select an IDE design drawing from the drop-down list.

Figure 4-Design Surface with Google Glass Layout

This layout will be effective in any color of Google glasses. Similarly, you can define your own Google Glass devices in Device management through (Tools-> Options-> Environment Options-> Form Designer-> Device Manager. Add a new device to the Android platform. You only need to activate the left direction of the landscape. You will need to provide a back-scene image of at least 472x240 pixels. If you want to, you can specify the size of the status bar, but you will usually hide it in the glasses application (

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.