Android Question Total Noob overlay

knitehawk

New Member
Licensed User
Longtime User
Hi, i'm a total noob.
i'm trying to create a custom app to add an overlay black background with adjusting alpha over all of android, that can receive serial signal over a USB com port that is sending ambient light values to auto adjust brightness by adjusting the alpha overlay.

problem i'm addressing is that if you have a android (minix x5 neo) connected to a tv over hdmi, it can be very bright. so i want to make an app that i can connect to a com port serial device that can recieve the input and adjust the brightness.
i can make the hardware side with ease using a atmel and a photocell doing an averaged a/d conversion and spitting that out of the uart to a serial port.

i'm just not sure how to make the "layer" persistent even when you close the adjustment app.

i can make an app that will work within the app, but when you close it the alpha layer closes as well.
i know there are apps that can do this, but they don't have any way to auto adjust for a large tv over hdmi.

any help would be appreciated!
 

knitehawk

New Member
Licensed User
Longtime User
You can use Phone.SetScreenBrightness to change the brightness. However you can only call it from an activity. So you will need to start an activity, set the brightness and remove the activity. It will be simpler than showing a semi-transparent activity over all other apps.

apparently not. i tried that first off. it had no effect on the hdmi port.
there are countless threads about that. hell it didn't even have an effect with the activity open and on focus.
i set it in a button to test. you could click it all day with no effect what so ever.
so, the only way i can see is to do it with a black background and adjust the alpha.
this worked in the app perfectly, however i need it to overlay the screen in all OTHER apps.
just think about playing a video or content in a window with a 65 inch LED LCD at 2am.
first car that passes by is going to wreck from blindness.


thanks!!
 
Upvote 0
Top