Android Question Google Glass - setComponentEnabledSetting in EYE_GESTURE

Alberto Iglesias

Well-Known Member
Licensed User
Longtime User
Anyone know how I can intercept an intent when the component is not enabled?

I try this code, but with no success

The Intent is: com.google.glass.action.EYE_GESTURE

My app has a package: com.visualnet.glasswink
and one service name: Wink

and in my manifest I have:

AddReceiverText(Wink,
<intent-filter android: priority="2000">
<action android:name="com.google.glass.action.EYE_GESTURE" />
<action android:name="android.intent.action.CAMERA_BUTTON" />

</intent-filter>)


Look this two intents: the first one (EYE_GESTURE) not working but the second YES (CAMERA_BUTTON)


I´m doing anything wrong??????


Dim r As Reflector
Dim cn As Object = r.CreateObject2("android.content.ComponentName", Array As Object("com.visualnet.glasswink", "com.visualnet.glasswink.wink"), Array As String("java.lang.String", "java.lang.String"))
r.Target = r.GetContext
r.Target = r.RunMethod("getPackageManager")
'COMPONENT_ENABLED_STATE_ENABLED = 1
'COMPONENT_ENABLED_STATE_DISABLED = 2
r.Target = r.RunMethod4("setComponentEnabledSetting", Array As Object(cn, 1, 0), Array As String("android.content.ComponentName", "java.lang.int", "java.lang.int"))
 

Alberto Iglesias

Well-Known Member
Licensed User
Longtime User
Erel,

Look this 2 source codes:

The EyeGestureLib-1.1.zip coming with apk (I found in github) and works very well, when I blink with my right eye, the gesture is identify, but I can't convert to B4A to use.

And the source code glass-event-test-master.zip is the code with listener I try to use.

You can help me to choose the best way to get the eye gesture?


Anyway, to use the JavaObject in one of this case, how I do that?
 

Attachments

  • EyeGestureDemo-debug-1.1.zip
    44.4 KB · Views: 192
  • EyeGestureLib-1.1.zip
    64.7 KB · Views: 175
  • glass-event-tester-master.zip
    511.6 KB · Views: 214
Last edited:
Upvote 0
Top