B4A Library Google Glass Library

GlassB4a2.jpg


This library was made exclusively for the development of Google Glass.

She uses the template library available from Google that is GDK.JAR (The Glass Development Kit)

More detailed explanations are available on:
https://developers.google.com/glass/develop/overview


This first version is in correctly intercept touches on "TOUCH PAD" Google Glass, which can be:

public static final Gesture LONG_PRESS
public static final Gesture SWIPE_DOWN
public static final Gesture SWIPE_LEFT
public static final Gesture SWIPE_RIGHT
public static final Gesture SWIPE_UP
public static final Gesture TAP
public static final Gesture THREE_LONG_PRESS
public static final Gesture THREE_TAP
public static final Gesture TWO_LONG_PRESS
public static final Gesture TWO_SWIPE_DOWN
public static final Gesture TWO_SWIPE_LEFT
public static final Gesture TWO_SWIPE_RIGHT
public static final Gesture TWO_SWIPE_UP
public static final Gesture TWO_TAP

More detailed explanations are available on:
https://developers.google.com/glass.../android/glass/touchpad/GestureDetector?hl=es


Installation instructions:
- Copy the .xml and .jar files to your custom libraries folder
- Copy the res directory to your projects "Objects" folder
- Make all files copied to the Objects/res folder read only

- Extend your activity with glasslib class, putting this line in your Activity Attributes


#Region Activity Attributes
#Extends: com.visualnet.googleglass.glassActivity
#End Region




Version history:
V1.01:
- initial version with GestureDetector and the various types of Gesture

V1.02:
- included the original sounds and method to play sounds in your glass

GlassLib12.jpg



IMPORTANT: Whit this library, the Activity_Keypress in intercepted by Library, then you can control by gesture of Google Glass. Look the Example in B4A.

Have fun with it


Special Thanks to Nelson Pires (vpires)
 

Attachments

  • GoogleGlassTest.zip
    511.7 KB · Views: 291
  • GoogleGlassLib11.zip
    48.2 KB · Views: 248
  • GoogleGlassLib12.zip
    38.3 KB · Views: 264
Last edited:

Andris

Active Member
Licensed User
Longtime User
google-glass2-b910424100ec7c2fc4b6efd0f280d51613e864db-s6-c10.jpg


This library was made exclusively for the development of Google Glass.

She uses the template library available from Google that is GDK.JAR (The Glass Development Kit)

More detailed explanations are available on:
https://developers.google.com/glass/develop/overview


This first version is in correctly intercept touches on "TOUCH PAD" Google Glass, which can be:

public static final Gesture LONG_PRESS
public static final Gesture SWIPE_DOWN
public static final Gesture SWIPE_LEFT
public static final Gesture SWIPE_RIGHT
public static final Gesture SWIPE_UP
public static final Gesture TAP
public static final Gesture THREE_LONG_PRESS
public static final Gesture THREE_TAP
public static final Gesture TWO_LONG_PRESS
public static final Gesture TWO_SWIPE_DOWN
public static final Gesture TWO_SWIPE_LEFT
public static final Gesture TWO_SWIPE_RIGHT
public static final Gesture TWO_SWIPE_UP
public static final Gesture TWO_TAP

More detailed explanations are available on:
https://developers.google.com/glass.../android/glass/touchpad/GestureDetector?hl=es


Installation instructions:
- Copy the .xml and .jar files to your custom libraries folder
- Copy the res directory to your projects "Objects" folder
- Make all files copied to the Objects/res folder read only

- Extend your activity with glasslib class, putting this line in your Activity Attributes


#Region Activity Attributes
#Extends: com.visualnet.googleglass.glassActivity
#End Region




Version history:
V1.01:
- initial version with GestureDetector and the various types of Gesture

IMPORTANT: Whit this library, the Activity_Keypress in intercepted by Library, then you can control by gesture of Google Glass. Look the Example in B4A.

Have fun with it

Alberto, thanks so much for your work on this! I purchased Glass about a month ago and have looked at all your posts re: Glass in preparation for developing some apps. Perhaps you could use your status as B4A's "Glass pioneer" to convince Erel to add a special Forum for Glass-specific topics and questions? I think it would be great to separate out Glass discussions from everything else, don't you think?

Thanks again!!
 

Alberto Iglesias

Well-Known Member
Licensed User
Longtime User
Hello Andris,

I have A google glass about 2 months and have much trouble without this initial library, the next version to this lib have it the Card and Live Card commands.

I ask to Erel about a section specialized in Google Glass, i like this idea.

Look my first app for glass in Google play. Google Glass Color

https://play.google.com/store/apps/details?id=com.visualnet.glasscolor


Hugs!!!
 

lonleystar

Well-Known Member
Licensed User
Longtime User
Hi Alberto, have u tried to add in your lib the command AddView like Activity.AddView add the gallery and check if it work.

P.S.

I found some information about Google glass Gallery but there is no Gallery implemented in Google glass library at moment. anyway below is an attach try.
 

Attachments

  • Glass-Gallery-master.zip
    392.4 KB · Views: 220

CorbettMessa

Member
Licensed User
Longtime User
Anything special that I need to do to get your sample project (GoogleGlassTest.zip) to compile and run? I assume that I need to compile this and side load the APK to Glass with abd or can B4A automatically load to Glass? I don't have our Glass here right now, but can get it if I can load directly to it from B4A.

I tried to compile and run it and get this error:

upload_2014-5-13_12-55-55.png


thanks,
Corbett
 

CorbettMessa

Member
Licensed User
Longtime User
Hi Corbett, u can find it in \ANDROID SDK\Android\android-sdk\add-ons\addon-google_gdk-google-19 put it in C:\Program Files \Anywhere Software\Basic4android\Libraries and try it again.

I got the same error, I was not successfully to compile it.


That did it, thanks! Are you able to use B4A to send directly to Glass or do I need to use abd to install it?
 
Top