google-gdk

NoSuchMethodError for Card.setText() in XE16

不羁的心 提交于 2019-12-11 03:38:04
问题 My Glass updated to XE16 last night and I've been trying out my Glassware on it. I was able to get some of them running, but I am getting NoSuchMethodErrors on Card.setText() and Card.setFootnote() calls: java.lang.NoSuchMethodError: com.google.android.glass.app.Card.setText I updated my AndroidStudio projects to use the Glass Development Kit Preview on API 19 (4.4.2) and the compiler doesn't balk on the calls. The Glassware throws the error when the method is executed. Anyone else seeing the

How to add another option to the share functionality of Google Glass?

笑着哭i 提交于 2019-12-10 22:18:44
问题 I am interested to add my service into the share functionality of the Google Glass, my flow is below: 1. Take photo / Record video 2. Share with -> My service 3. the photo or video should be uploaded to my site Is this functionality possible? it is very similar to Facebook and G+ share options. I will be happy to know how to do it, Thanks. 回答1: What you are looking for is what the Mirror API calls a Contact. Your Glassware can setup one or more Contacts, specifying what content type can be

Google Glass search in language other than English?

ⅰ亾dé卋堺 提交于 2019-12-10 21:35:44
问题 I have looked through the web and not found any information about if the Google Glass will have speech recognition in other languages than English? Like Google Now for example has a fine working recognition for Swedish. Or do I need to implement some third-party recognition myself? If anyone in the Google Glass Team has this info, this would be nice to know! Thanx Joakim 回答1: I'm not on the team, but the usual response is that the focus right now is the US only and that they don't comment on

RecognizerIntent.ACTION_RECOGNIZE_SPEECH blocked when a tap occurs

旧街凉风 提交于 2019-12-10 17:15:07
问题 In my main activity I launch a new Intent: Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH); intent.putExtra(RecognizerIntent.EXTRA_PROMPT, "What would you like to find?\n For example \"Open heart surgery\""); startActivityForResult(intent, SPEECH_REQUEST); Then I retrieve the keywords that were spoken here: @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == SPEECH_REQUEST && resultCode == RESULT_OK) { List<String>

No connectivity message in “ok glass” menu

爱⌒轻易说出口 提交于 2019-12-10 11:14:56
问题 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? 回答1: You can do this by adding the network constraint to your voice trigger, as

GoogleGlass : Add image in background : unsupported image scheme: http

梦想的初衷 提交于 2019-12-10 10:26:52
问题 I have a problem when i try to set an image URL on a Card . Here is the error log : unsupported image scheme: http 01-16 14:11:50.188: E/AndroidRuntime(2851): FATAL EXCEPTION: main 01-16 14:11:50.188: E/AndroidRuntime(2851): java.lang.IllegalArgumentException: unsupported image scheme: http 01-16 14:11:50.188: E/AndroidRuntime(2851): at com.google.android.glass.app.Card.addImage(Card.java:178) 01-16 14:11:50.188: E/AndroidRuntime(2851): at com.example.cupofnewsglass.MainActivity.processFinish

Google Glass upload files using http-client

为君一笑 提交于 2019-12-09 22:57:14
问题 I am trying to upload an image file using http-client from my Google Glass to my server but it always gets stuck at the httpclient.execute() method. I am not sure how should I approach uploading files from my Glass. This is what I have so far: httpClient = HttpUtils.getNewHttpsClient(); postRequest = new HttpPost(strURL); final File file= new File("mnt/sdcard/DCIM/Camera/12232.jpg"); s = new StringBuilder(); try { if(file.exists()) { final FileBody bin = new FileBody(file); final

Glass - Slow camera \ FileObserver notification - XE12 - using ACTION_IMAGE_CAPTURE

南笙酒味 提交于 2019-12-09 22:35:59
问题 I have basically implemented the new XE12\GDK2 cameramanager sample code to capture an image on application start. However, the notification to the FileObserver callback takes anywhere from 3 to 30 seconds to get the notification of the image file creation. Taking a picture using the default 'Take a Picture' app works just fine so I dont thin it is an OS\update issue. My app's behavior is like: - Take the picture - Tap to accept Wait 3 to 30 seconds - Get the callback and the imageview is

How to play YouTube video in WebView on Google Glass

回眸只為那壹抹淺笑 提交于 2019-12-09 06:28:55
问题 I have code like this: setContentView(R.layout.webview); webView = (WebView) findViewById(R.id.webView); webView.getSettings().setJavaScriptEnabled(true); webView.loadUrl("https://www.youtube.com/watch?v=_Z5-P9v3F8w"); It'll show the youtube video with the Play button, but none of the Glass gesture can make the video play. Any ideas? Thanks! 回答1: Finally figured out how to play Youtube video on Glass! Intent i = new Intent(); i.setAction("com.google.glass.action.VIDEOPLAYER"); i.putExtra(

Google glass returning NoClassDefFoundError for glass.widget.CardBuilder

為{幸葍}努か 提交于 2019-12-08 10:42:26
问题 I'm very new to Glass development yet have run into a frustrating problem which has pretty well halted my progress entirely. Upon building and running any Glass project, I am greeted with the error: java.lang.NoClassDefFoundError: com.google.android.glass.widget.CardBuilder This error occurs as soon as the CardBuilder class is accessed. I have imported the class and no errors appear during building, it is when the code is actually ran on the device that the issue occurs. Now interestingly,