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"))
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"))