google-gdk

Bluetooth Pairing Google Glass

爱⌒轻易说出口 提交于 2019-12-04 19:18:49
Using Google Glass, I am able to discover Bluetooth devices and see their address and information. However, I cannot get the Glass to pair (bond) with them. Update Following the instructions on this page now I'm trying to get the bonding, but for some reason the BluetoothDevice.ACTION_BOND_STATE_CHANGED.equals(action) is never happening. private void pairDevice(BluetoothDevice Ddevice) { Log.d("MY_LOG", "Try to pair " + Ddevice.getName()); try{ Method m = Ddevice.getClass().getMethod("createBond", (Class[]) null); m.invoke(Ddevice, (Object[]) null); Log.d("MY_LOG", "Pairing " + Ddevice.getName

Glassware uninstalled after google glass reboot

99封情书 提交于 2019-12-04 19:15:38
I have created a test build of a GDK Glass app that I want to deliver to a few test users. However the app disappears after a reboot. Logcat shows this: 08-19 18:18:18.256: I/GlasswareSyncAdapter(978): Uninstalling Glassware ID #6DBADA7634397F00 (com.example.demo). A look at the issue tracker explains that this is caused due to the fact that the MyGlass app didn't install this app and that the app thus isn't linked to the user's account. Are there any workarounds? With a submission process of over a month how can we get our app tested properly? The submission process should be less than a

Google Glass upload files using http-client

空扰寡人 提交于 2019-12-04 17:08:48
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 MultipartEntity reqEntity = new MultipartEntity(HttpMultipartMode.BROWSER_COMPATIBLE); reqEntity.addPart("uid", new

HTTP Requests in Glass GDK

时间秒杀一切 提交于 2019-12-04 14:12:19
问题 I am implementing a GDK application and need to do in my application some HTTP Post requests. Do I send the HTTP requests the same way as on android phone or there is some other way of doing it? (I have tried the code that I am using on my phone and it's not working for glass.) thanks for your help in advance. 回答1: You can make any post request like in smartphones, but ensure you make the requests using an AsyncTask. For example: private class SendPostTask extends AsyncTask<Void, Void, Void>

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

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

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.