google-glass

How to launch a regular Activity on Google Glass

妖精的绣舞 提交于 2019-12-04 09:29:27
I have been looking through the github examples for google glass and my code doesn't really look very different. With the exception of launching a regular TextView , my code should theoretically work. My Activity code is: package com.helloglass; import android.os.Bundle; import android.app.Activity; public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } } My Layout is <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http:/

Class not found error for any glass api

女生的网名这么多〃 提交于 2019-12-04 09:09:23
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? You have to set your project to compile with the Glass GDK. Make sure you're targeting 15, have the GDK downloaded as per the other answer, and then: Select your project on the left side of the screen, open project

Why does Glass/GDK based VoiceListener only catch VoiceCommand once in XE16?

给你一囗甜甜゛ 提交于 2019-12-04 06:06:47
In search for a way to implement contextual voice commands with Google's GDK i came across this post . Yet, the example code seems to work only in XE12 not in XE16+. I tested this code recently, but the onVoiceCommand(...) method is only called once in the lifetime of a related Activity. My expectation would be that a user's voice command can be obtained multiple times, i.e., if a user returns to a certain Activity from another one. I even tried to remove and reattach the Activity and/or Listener to the GDKs built-in VoiceInputHelper when the Activity is backgrounded via the onPause(...) and

Need an interruptable way to listen for UDP packets in a worker thread

荒凉一梦 提交于 2019-12-04 06:04:09
问题 I'm developing a Google Glass app which needs to listen for UDP packets in a worker thread (integrating with an existing system which sends UDP packets). I previously posted a question (see here) and received an answer which provided some guidance on how to do this. Using the approach in the other discussion I'll have a worker thread which is blocked on DatagramSocket.receive(). Further reading suggests to me that I'll need to be able to start/stop this on demand. So this brings me to the

How to check if Google Glass is connected to internet using GDK

僤鯓⒐⒋嵵緔 提交于 2019-12-04 04:23:46
问题 Is there a way to detect if Google Glass is connected to the internet at runtime? For instance, I often get the message "Can't reach Google right now" when using voice input in my app. Instead, I would like to preemptively intercept the condition that would cause that message and use default values rather than ask for voice input. After searching for a while, the only thing I could find was a solution to the same question for Android in general: private boolean isConnected() {

Google Glass (Not installed)

时光总嘲笑我的痴心妄想 提交于 2019-12-04 04:09:10
问题 I am new to Android Studio and google-Glass. I am trying to create a knew project that will use google-glass but my problem is when I have to Check/select glass it is Disabled and I do not know how to fix this problem. See the Image below. and here is my SDK that shows that i have installed APK 19. and with the Image below it shows that the glass does appear on Android Studio can anyone please help me if the is something wrong that i am doing. will appreciate your Help. 回答1: In my case, I

Is it possible to register a top-level intent in the Mirror API?

走远了吗. 提交于 2019-12-04 03:56:07
Example "top-level actions" would be "Google," "take a picture," etc. Is it possible using the Mirror API to register a custom top-level event? "OK Glass, crunchify me." A secondary question I have is if it's possible to take user speech. Using the "OK Glass, Google" example, the user says a query that Google takes and acts on. Is it possible to capture that for your custom action using the Mirror API? This is not yet possible with the Glass client nor the Mirror API. However, there is already a filed feature request that you can follow to get updates on the progress. You can do that right now

Attaching video with video/vnd.google-glass.stream-url after Update XE6

安稳与你 提交于 2019-12-04 02:13:43
问题 Attaching video with the XE6 Google Glass Update is getting stuck. The code I'm using is this: String videoUrl = "http://www.youtube.com/watch?v=9bZkp7q19f0"; if (videoUrl != null) { String contentType = "video/vnd.google-glass.stream-url"; InputStream is = new ByteArrayInputStream( videoUrl.getBytes( ) ); MirrorClient.insertTimelineItem(credential, timelineItem, contentType, is); } Not sure what I'm doing wrong, but the video is still trying to download and it's killing my battery ... 回答1: I

Can I test a program for Google Glass without Google Glass?

蹲街弑〆低调 提交于 2019-12-03 19:33:00
问题 Can I write and test a Hello World program for Google Glass without actually having it? Is there an emulator I can use to test the app? 回答1: I have seen a video showing that we can run it on Nexus Tablet. Check out the link http://liliputing.com/2013/05/run-google-glass-apps-on-a-nexus-7-tablet.html 回答2: No... there's not official Google Glass Emulator. Yes... you can preview your cards in playground. This shows you how content is displayed on Google Glass. And yes... you can test Google

PreferenceFragment cannot scroll up/down on XE16 (worked fine on XE12)

前提是你 提交于 2019-12-03 17:35:51
I have a few user preferences, mostly simple check-boxes, in my Glass GDK app. I could not find a glass specific preference paradigm, so I used PreferenceFragment and it worked fine on XE12. FYI: When I implemented it, it initially looked bad, but I improved that by using the following style in the AndroidManifest for my SettingsActivity: <style name="Theme.Preferences" parent="@android:style/Theme.Holo.NoActionBar.Fullscreen" /> I had no option to not update to XE16 (other than turning off network connectivity). After the update I tweaked my app's API usages for the few XE16 changes.