Android Question Wrapping the GDK.JAR to Library for B4A

Alberto Iglesias

Well-Known Member
Licensed User
Longtime User
Anyone can help me to generate a little library with this library?

I´m wrap the gdk.jar through "Library Generator" and compile with "Simple Library Compiler v1.0.1)

After try to generate through Library Generator, I got FirstLib.java (inside a FirstLibjava.zip).

I Just want to get the movements and touch of com.google.android.glass.touchpad

because is another API...


In Google Glass not working Activity_Touch
In Google Glass not working the Library [Lib] Gesture Detector
In Google Glass works (IN PARTS ONLY) then library OUYA Controller Library (I can get the movements through _GenericMotion
only after touch any key, but after that, activity_keypress not work anymore)


Somebody with a great heart to help me?
 

Attachments

  • FirstLib.zip
    18.1 KB · Views: 212
  • B4ATestLib.zip
    6.8 KB · Views: 218
  • FirstLibJAVA.zip
    720 bytes · Views: 202

Erel

B4X founder
Staff member
Licensed User
Longtime User
Please try this code and see whether the generic motion is intercepted:
B4X:
Sub Activity_Create(FirstTime As Boolean)
   Dim jo As JavaObject = Activity
   Dim ev As Object = jo.CreateEvent("android.view.View.OnGenericMotionListener", "GenericMotion", True)
   jo.RunMethod("setOnGenericMotionListener", Array As Object(ev))
End Sub

Sub GenericMotion_Event (MethodName As String, Args() As Object) As Object
   Log(Args(1))
   Return True
End Sub

It requires the latest JavaObject library.
 
Upvote 0
Top