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.
Created attachment 3239 [details]
Sample attempting to change brightness of screen, illustrating the missing SetAttributes method.
It was discovered in a stackoverflow thread, that the Window class does not seem to have a SetAttribute method, which is usually used to update the Windows attributes. http://stackoverflow.com/questions/14391032/monodroid-how-to-adjust-device-screen-brightness-programmatically
For instance when attempting to set the brightness of the screen by changing Window.Attributes.ScreenBrightness nothing happens. Usually on native Android, you set the attribute with the setAttribute method like so:
WindowManager.LayoutParams lp = this.getWindow().getAttributes();
lp.screenBrightness = 1;
This seems to be missing from Mono for Android. A sample project has been attached attempting to show this method is missing.
Window.setAttributes() was bound as the Window.Attributes property:
I have checked this issue on following builds:
Xamarin Studio : 4.2.3 (build 60)
Xamarin.Android: 4.13.0 (Business Edition)
As per comment 1, I am able to set the brightness of the screen. Hence I am closing this issue.