Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Unable to dim the screen of google glass. Only workaround is to leave the screen on at full brightness at all times and this causes battery issues.
Adding the android:immersive=”true” flag to the android manifest file for a glass app created with Xamarin does not work. After 5 seconds of the screen being auto turned off by glass this flag should allow the last activity to be resumed on waking glass, however, all that is displayed is the google glass home screen. To test I created a blank Xamarin android app using visual studio 2013 and added the android:immersive=”true” flag to the manifest for the MainActivity. I also loaded up the glass api demo app from https://github.com/googleglass/gdk-apidemo-sample.git in Android Studio and added the same flag to the activities. The android studio app will resume when glass is wakened with a finger press, however the xamarin app will not.
Created attachment 8708 [details]
Test App to reproduce problem
Created attachment 8709 [details]
GoogleGlass working app
Confirmed in 4.18.1. Setting android:immersive="true" in an activity in the manifest does not cause it to resume after waking the glass from several seconds of device standby, it acts the same as the default or android:immersive="false" and returns to the home screen instead.
Client is looking for a workaround other than forcing the device's screen to maximum brightness, which greatly impacts battery life.
We figured out that this android:immersive does not exist on http://developer.android.com/guide/topics/manifest/activity-element.html but it does on https://developers.google.com/glass/develop/gdk/immersions .
We added another property on Android.App.ActivityAttribute class.
Just to go on from Atsushi's comment, the correct way (when the issue above is live) will be to add the Immersive property to your Activity attribute, so it would look like this:
[Activity (Label = "Hello Xamarin", Icon = "@drawable/Icon", Immersive = true, MainLauncher = true, Enabled = true)]
for now, to work around the issue, you can do a build of the project and look at the generated AndroidManifest.xml file in the obj folder and extract the Activity and manually add the immersive property like in the example from Google on https://developers.google.com/glass/develop/gdk/immersions
<activity android:enabled="true" android:icon="@drawable/icon" android:immersive="true" android:label="Hello Xamarin" android:name="helloglassworld.MainActivity">
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<meta-data android:name="com.google.android.glass.VoiceTrigger" android:resource="@xml/voicetriggerstart" />
<action android:name="com.google.android.glass.action.VOICE_TRIGGER" />
I hope this helps!
... forgot to say and manually add this into the AndroidManifest.xml file in your main project.
Fixed by Atsushi in comment 4.
Confirming that this is resolved in Master.
Verifying based on Comment #8