google-gdk

What is android:immersive attribute in Android manifest file?

微笑、不失礼 提交于 2019-12-06 03:19:19
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 (AndroidManifest.xml file). My activity stays alive even after screen is timed out and my activity resumes when i tap

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

妖精的绣舞 提交于 2019-12-06 02:39:31
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(MainActivity.java:112) Here is my code : // Get img of article, it return an string like : http://img.

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

南楼画角 提交于 2019-12-06 01:10:16
问题 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

Google Glass Android Studio Gradle issues

十年热恋 提交于 2019-12-05 21:44:01
I am trying to build my first Google Glass app, using Android Studio 0.5.4. But am getting a build error: Error:Module 'TestApplication-TestApplication': platform 'Google Inc.:Glass Development Kit Sneak Peek:15' not found. As you can see the GDK, and all necessary library files are installed. I have looked at a few different questions about this already, primarily Google Glass: GDK with Android Studio Android Studio || GDK 'hello word' || import com.google.android.glass.app.Card || Cannot Resolve Symbol 'google' Error:Module 'App name': platform 'android-15' not found Which recommends to

Google Glass GDK Authentication using PHP

天涯浪子 提交于 2019-12-05 16:27:29
I am trying to follow this link to authenticate user in GDK: https://developers.google.com/glass/develop/gdk/authentication It gives example in Java, but my webpage uses PHP. I know I have to use https://github.com/google/google-api-php-client/blob/master/src/Google/Service/Mirror.php I am stuck with service auth page making call to mirror.accounts.insert. Not sure how to implement the service auth page. Any example would be great help. [SOLVED] Working example is here: http://goo.gl/DVggO6 The service auth page is the page that is opened when that user turns on your application in MyGlass.

How to send email via Glass

二次信任 提交于 2019-12-05 08:17:14
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(Intent.createChooser(emailIntent, "Send mail...")); But I am getting "No apps can perform this action".

How can I brighten the screen when opening an Activity in my Glass GDK immersion application?

蹲街弑〆低调 提交于 2019-12-05 05:51:35
I have a GDK immersion application, where the launcher Activity acquires a SCREEN_DIM_WAKE_LOCK WakeLock . The app also has a Service which will receive chat messages and starts an Intent for an Activity to display each one. Whenever the message Activity is opened, I want to brighten the screen. However, all of the methods I have found do not seem to work. For example, adding the following into onResume has no effect: Settings.System.putInt(getContentResolver(), SCREEN_BRIGHTNESS_MODE, SCREEN_BRIGHTNESS_MODE_MANUAL); WindowManager.LayoutParams lp = getWindow().getAttributes(); lp

Detect Google Glass Programmatically

蹲街弑〆低调 提交于 2019-12-05 05:50:30
From a native application how can we detect Google Glass verses a smart phone from code? Moving correct answer to question: boolean isRunningOnGlass() { return "Google".equalsIgnoreCase(Build.MANUFACTURER) && Build.MODEL.startsWith("Glass"); } Another way of doing this would be to use the Build API: http://developer.android.com/reference/android/os/Build.html Using the GDK, you could use: boolean isRunningOnGlass() { return "Google".equalsIgnoreCase(Build.MANUFACTURER) && Build.MODEL.startsWith("Glass"); } (The model check may be good if a new model of Google Glas comes out.) jeffrey_t_b I

How to send your .apk Glass Application for your client to see?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-05 02:15:53
I'm jumping head first into Android for Google Glass development and I'd like to know how I can let my client see the .apk that I'm working on. My client owns a pair of Google Glass too but lives far away. So far, the only way I have been able to upload to Glass is using ADT, Run As -> Android Application when my Glass is connected by USB. How can I put the Glassware (apk) up online so he can "load it up" into his glass remotely? Or deploy it to his glass? I read Send the .apk file to client for review but it's more related to Android devices, whereas my client uses Google Glass and doesn't

How do I create a dark Google Maps image for Google Glass?

半腔热情 提交于 2019-12-05 01:58:55
问题 I need to create a dark/inverted map image for use on Google Glass, since the standard Google static maps image is too bright when displayed on the screen. How can I customize the map theme to look good on Glass? 回答1: The Google Static Maps API provides a number of customization options to change the colors of the map features. Here's an example of an activity that loads a dark/inverted static map image and displays it in a full-screen ImageView on Glass. The description of the query