google-gdk

How do you customise Glass contextual voice menu in an immersion *after* its initial setup?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-08 06:40:02
问题 I've successfully populated the contextual voice menu of my glassware immersion but I want to be able to change the menu after the initial set up in onPreparePanel() or onCreatePanelMenu() as described here: Programmatically populated contextual "ok glass" menu. Ideally one of the callbacks would be called after receiving the 'ok, glass' voice command but as far as I can tell, none of them are. Outcome, you're stuck with the version of the voice commands menu as it was the first time you cam

What is android:immersive attribute in Android manifest file?

跟風遠走 提交于 2019-12-07 18:19:42
问题 I was developing an app for Google glass and i was facing a problem with my activity. They ended when i didn't interact with them for 7 to 10 seconds. After the screen turned off and i tapped my glass to wake it up again, my activity would disappear and i was on ok glass Screen. I searched a lot but couldn't find any solution to this. Then i came across this android:immersive attribute in Activity in AndroidManifest.xml file. After using android:immersive="true" in my activity

SpeechRecognizer insufficient permissions error with Glass

淺唱寂寞╮ 提交于 2019-12-07 16:53:54
问题 I am building an application with the GDK sneak peek and am having trouble getting speech recognition working in an immersive app. This is my first android project. I tried to follow this: How can I use speech recognition without the annoying dialog in android phones After making initial progress, I hit a problem where the RecognitionListener class is throwing Error 9, insufficient permissions. I am using the GDK, which is Android-15. Initialization of the Recognizer is in my onCreate()

Google Glass Eye Gesture Crashing (EyeGestureLib)

六月ゝ 毕业季﹏ 提交于 2019-12-07 10:29:38
问题 I am trying to check Wink from Glass using the EyeGestureLib. I created a new project and did exactly what the guy did with the sample project here. The problem part of my code is below: private EyeGestureManager mEyeGestureManager; private EyeGestureListener mEyeGestureListener; private EyeGesture target1 = EyeGesture.WINK; private EyeGesture target2 = EyeGesture.DOUBLE_BLINK; Inside onCreate, I have: mEyeGestureManager = EyeGestureManager.from(this); mEyeGestureListener = new

How to send email via Glass

a 夏天 提交于 2019-12-07 03:05:43
问题 I am trying to send an image taken from Glass with below code... Intent emailIntent = new Intent( android.content.Intent.ACTION_SEND); emailIntent.setType("plain/text"); emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[] { "xyz@gmail.com" }); emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "My Subject"); emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "My image attached"); emailIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse(imageLocation)); startActivity

how to scroll live cards in aglass activity

南楼画角 提交于 2019-12-06 12:11:19
I'm writing a glass app. In one activity I want to scroll between few cards (which were popups in my android app). 1) I thought to use cardsScrollView. problem: Is it possible to set customView to a card object? 2) I thought to use LiveCard problems: Is it possible to publish them inside my app and not in the timeline? Is there an equivalent LiveCardsScrollView? Any other idea how to implement this? From Google's sample code at https://developers.google.com/glass/develop/gdk/ui/theme-widgets and API documentation at https://developers.google.com/glass/develop/gdk/reference/com/google/android

How can I read qr code inside GDK app?

六月ゝ 毕业季﹏ 提交于 2019-12-06 11:32:28
I want to read qr code from GDK app to get authorization token. Is there any build in methods to read QR codes in GDK? QR code could be obtained from bitmap using this ZXing library To get the bitmap Glass camera intent could be used. Acarin This worked for me. Intent objIntent = new Intent("com.google.zxing.client.android.SCAN"); objIntent.putExtra("SCAN_MODE", "QR_CODE_MODE"); startActivityForResult(objIntent, 0); You can read QR using the library located at https://code.google.com/p/barcodefraglibv2/wiki/HowTo Have tested it to work on Glass without any problem. 来源: https://stackoverflow

Programmatically populated contextual “ok glass” menu

一世执手 提交于 2019-12-06 11:32:17
问题 Is there any way to populate the custom "ok glass" menu in my glassware programmatically? I have an application where the user will be in an immersion and interact with the system mainly by voice commands. The immersion consists of a CardScrollView displaying different sets of data. These sets are added and removed dynamically from a bluetooth service talking to a phone and the glass unit can't know in advance what new sets will appear. What I want the user to be able to do is to list all

No connectivity message in “ok glass” menu

自古美人都是妖i 提交于 2019-12-06 07:56:07
I am developing an app which adds a live card into the timeline when the user selects the option from menu, like the sample apps do. I noticed that, when you don't have any connectivity, the native apps on the glass, like Google, show "No network connectivity" message in the "ok glass" menu and it is not possible to run them. I would like to replicate this behavior. Is there a way to do this with the GDK API? You can do this by adding the network constraint to your voice trigger, as described in the GDK Voice Input documentation . For example: <trigger keyword="@string/your_voice_trigger">

Class not found error for any glass api

空扰寡人 提交于 2019-12-06 06:06:00
问题 I configure eclipse ADT for glass development successfully. Then I create a sample project and try to develop google glass card or timelineitem. when I compile and run, an error occurred from android tuntime java.lang.NoClassDefFoundError: com.google.android.glass.app.Card this error also occurring for com.google.android.glass.timeline.TimelineManager Error Log How can I solve it? 回答1: You have to set your project to compile with the Glass GDK. Make sure you're targeting 15, have the GDK