My android device has a Display Mode
under Settings -> Display
page. This display-mode settings screen displays various display modes such as 480i, 480p, 720p, 1080p, 1080i
etc...
My device has Android OS version 2.3.3. Please note, this is a custom made Android device.
When I select any of these display modes, my device's mode get changed. I need to get the currently selected display-mode value programatically.
Is there any way this can be done ?
The Settings
screen
The Display Settings
screen
The Output Mode
spinner
I got a solution.
First way
I saw an app named About. This application lists SystemProperties
as list with propertyname
and value
. From this, i got the required property name as ubootenv.var.outputmode
.
Then i got another thread which reads the SystemProperties
using the getprop
android command from here : Parsing Android getprop
By this way, now i am able to get the display-output-mode
parameter.
Second way
I also tried using android.os.SystemProperties
class via reflection and tried invoking get
method. But this is returning null
always.
Anyway the first method is working. Thanks for your help :)