LoadingTechland

  • Home
  • About Us
  • Contact Us
  • Privancy
  • Disclaimer

Create your first google glass app.

by Unknown 13:53:00 Google Android
Follow this steps for create your first google glass app:




Setting Up Your Glass



The first thing you need to do is enable debug mode on your Glass. You have to do something like this on every Android device you use for development of your apps so this might be familiar. To enable debug, swipe to “Settings” -> “Device info” and then tap to open device menu. Select “Turn on debug” and it will be enabled.
In Android Studio, click “New Project” and fill in the project form. You can use something similar to this:

When selecting form factors and API make sure to select “Glass” and API 19


Select “Immersion Activity” as your startup activity.




1. Downloading GDK (Glass Development Kit)



Glass Development Kit provides APIs to build glassware applications. These APIs won’t be available in all the versions of android.

1 Open SDK manager from your android’s SDK folder.

2 Select Android 4.2.2 (API 19) or you can also select higher version if you want, Google USB Driver (under Extras) and click on Install Packages. This takes a while to download all the packages.

2. Installing Google Glass Drivers

Android device drivers can be installed either from android SDK’s google usb drivers or with the software that comes from device manufacturer. For Google Glass we can directly use google usb driver. But before installing we need to do a modification in android_winusb.inf, otherwise, your glass device won’t be listed in Eclipse even though you have installed the drivers correctly.

1.Goto your android_SDK_folder\sdk\extras\google\usb_driver and edit android_winusb.inf. Add the below text at the end of the file.
[Google.NTamd64]
;GoogleGlass
%SingleAdbInterface%        = USB_Install, USB\VID_18D1&PID_4E11&REV_0216
%CompositeAdbInterface%     = USB_Install, USB\VID_18D1&PID_4E11&MI_01
%SingleAdbInterface%        = USB_Install, USB\VID_18D1&PID_9001&REV_0216
%CompositeAdbInterface%     = USB_Install, USB\VID_18D1&PID_9001&MI_01
[Google.NTx86]
;GoogleGlass
%SingleAdbInterface%        = USB_Install, USB\VID_18D1&PID_4E11&REV_0216
%CompositeAdbInterface%     = USB_Install, USB\VID_18D1&PID_4E11&MI_01
%SingleAdbInterface%        = USB_Install, USB\VID_18D1&PID_9001&REV_0216
%CompositeAdbInterface%     = USB_Install, USB\VID_18D1&PID_9001&MI_01
2. Now open Run (shortcut Win + R) and type devmgmt.msc and press ok. This opens up Device Manager window.

3. In device manager right click on your Google Glass device and click install drivers. When it ask for browse location, select android_winusb.inf parent folder and follow the instructions.

Following links will help you if you got into any issue.
Google USB Driver
Installing USB Driver
Stackoverflow Discussion

3. Creating new Glass Project

Creating a glass project is same as usual android project, but it differs in choosing proper API version.

1. Create a new project in Eclipse. File ⇒ New ⇒ Android Application Project and give application name, project name and package.

2. Set Minimum Required SDK and Target SDK to API 19: Android 4.4 (KitKat), Compile With to Glass Development Kit Sneak Peek (Google Inc.) (API19) and select the Theme to None

3. Once the project is created open AndroidManifest.xml file and remove the themeandroid:theme property. By removing this property, glass will apply it’s own theme.

4. Open strings.xml and add below string values.
strings.xml
xml version="1.0" encoding="utf-8"?>
<resources>
     
    <string name="app_name">Hello Glass</string>
    <string name="action_settings">Settings</string>
     
    
    <string name="hello_glass">Hello Glass !</string>
    <string name="home_url">www.androidhive.info</string>
     
    
    <string name="start_command">Hello Glass</string>   
</resources>


5. Now open your main activity layout file and paste the following code. In my case my activity layout isactivity_main.xml
activity_main.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_centerInParent="true"
    android:gravity="center"
    android:orientation="vertical" >
    <TextView
        android:id="@+id/message"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/hello_glass" />
    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/home_url"
        android:textSize="20dp" />
</LinearLayout>


6. you don't have to modified anything in MainActivity.java. Your main activity should look like below.
MainActivity.java
package info.androidhive.helloglass;
import android.app.Activity;
import android.os.Bundle;
public class MainActivity extends Activity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }
}
Until now we are done with simple hello world program. In the next step we’ll learn how to deploy the app on the glass device.

4. Running the application on Glass

7. In order to deploy the app on Glass we need to turn on debug option. So on your glass go toSettings ⇒ Device Info ⇒ Turn on debug.

8. Now connect the Glass to your PC using a USB cable. Right click on the project and Run As ⇒ Android Application. your IDE will list the glass in the list of devices available. Select the glass device and press ok. You should able see the app running on your glass.



READ MORE
SHARE :

Welcome

Welcome
  • Popular
  • Recent
  • Comments
    Best Android apps of the month 2015
    Must-Have Mobile Apps for Productivity
    Windows 10 mobile can run iOS, Android apps
    Must Have Android Apps: Health and Fitness
    Best Google Cardboard apps
    Top 250+ Proxy Sites List 2016: Best Free Proxy Websites
    Free Tools To Make Marketing Magic
    Highly Useful AngularJS Tools for Web Developers
    Apple Releases iOS 8.3 — Here Are Its Top Five Features
    Open Source Tools for the Internet of Things(IOT)

Labels

Android Best Antivirus Computer Tricks Developers Entertainment Entertainment comedy Google Android google photos Inspiration Interesting Make Money Online Movies proxy and vpn Windows wordpress

Total Pageviews

Translate

About Me

Unknown
View my complete profile

Subscribe To

Posts
Atom
Posts
All Comments
Atom
All Comments

Popular Posts

  • Best Google Cardboard apps
    Google Cardboard is a wicked toy and a brilliant gift idea, allowing you to turn any Android 4.1+  phone  into a virtual-reality headset fo...
  • Online Ecommerce(online shopping) Sites In India 2015
    With people becoming busy with their work and commitments, they are left out with only a little spare time. In addition, with wide availab...
  • Secure Your Wireless (Wi-Fi) Home Network
    With traditional wired networks, it is extremely difficult for someone to steal your bandwidth but the big problem with wireless signals i...
  • Amazing sites that you can use in your daily life
    1.  FollowUpThen . Have you ever lost a potential client because you forgot to follow up? Don’t make the same mistake twice by sendi...
  • Best Free Cloud Storage Service Providers 2015
    Cloud storage services are great for sharing files with friends and families, keeping documents in sync between all of your devices, and ...
  • top 10 sites for download free softwares 2015
    There are many other sites are available for software download, but I just tried to list down some very popular sites that I like most. I h...
  • Backdrops Android App Review
    There’s a wide variety of quality wallpaper apps on the Google Play Store, and there’s even no shortage of wallpaper apps that feature...
  • Must Have Android Apps: Health and Fitness
    Those Android apps for health and fitness can really by useful: If you don’t have your health, you don’t have anything. (And at the very le...
  • Top 250+ Proxy Sites List 2016: Best Free Proxy Websites
    Proxy sites hides the identity of client or remote users, however there is a  reverse proxy  as well that can hide the identity of the ...
  • Open Source Tools for the Internet of Things(IOT)
    If you've been involved with IT in any capacity in recent years, you've probably heard the term "Internet of Things," or...

Labels

Android Best Antivirus Computer Tricks Developers Entertainment Entertainment comedy Google Android google photos Inspiration Interesting Make Money Online Movies proxy and vpn Windows wordpress

Template Created By : ThemeXpose . All Rights Reserved.