Closed GoogleCodeExporter closed 9 years ago
Hello,
Thanks for the feature request! The reason this feature is not yet part of the
GDK is because the product feature itself is still experimental: there are a
lot of ironing we need to do before this becomes a stable feature that
developers can safely rely on.
However, the "Innovate with the Glass platform" I/O 2014 talk mentions how you
can use the unreleased version of this feature for experimenting:
https://www.google.com/events/io/schedule/session/6ae47f24-b9bf-e311-b297-00155d5066d7
Short answer:
IntentFilter filter = new
IntentFilter("com.google.android.glass.action.EYE_GESTURE");
filter.setPriority(1000);
context.registerReceiver(new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
if (!“WINK”.equals(intent.getStringExtra(“gesture”))) {
return;
}
abortBroadcast(); // Otherwise you’ll get a picture!
// Do something...
}
}, filter);
Best,
Alain
Original comment by ala...@google.com
on 2 Dec 2014 at 4:21
Thanks for your reply Alain. I finally got it to work with your help but the
abortBroadcast is not doing anything. Therefore it is taking pictures when it
detects wink.
What I did was extend BroadcastReceiver and register my intent via the
Manifest. Any other way to stop it from taking a picture?
Original comment by innocla...@gmail.com
on 9 Dec 2014 at 1:27
Original issue reported on code.google.com by
innocla...@gmail.com
on 29 Nov 2014 at 12:54