Nice Android TV boxes and IPTV software

Developers: ¿How to rotate the screen on Exodux Android TV Box?

Tv Box Screen Rotation is complex, let’s say the true. Sometimes we need our APP running on portrait mode, as if we are on Digital Signage business. From Exodux Box, we want to share a method to rotate the screen:

 

HOW TO ROTATE THE ANDROID TV BOX SCREEN?

Mainly we get get the runtime and read ‘persist.sys.app.rotation’ property (we get ‘middle-port’ by default):

See the code at github

Or, by same way, we can set the ‘persist.sys.app.rotation’ property to ‘original’ or other:

See the code at github

Then we can rotate the screen by using these methods:

A) setRequestedOrientation( ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);

or

B) setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);

By default, the value is ‘middle-port’, but we can change to ‘original’ by getting the runtime. If we use ‘original’ value the behabiour will be as a mobile phone or tablet and your app will not be locked to landscape.

HOW TO USE THE EXODUX DEMO APK?

Button ‘Swap Rotation Mode’ switches between ‘original’ and ‘middle-port’, the current value will be displayed.

Buttom ‘Set Portrait Mode’ will swap the screen orientation to portrait.

Button ‘Set Landscape Mode’ will swap the screen orientation to landscape.

 

If we want a properly portrait usage, first change mode to ‘original’, then set to portrait.

 

WHERE CAN I GET A DEMO APK AND SOURCE CODE?

We try to make it easy, so, already precompiled a demo application and opened the source. There are probably many ways and as each developer may be building a total different app we are not sure if this is the best solution for you, but anyway, it may be an interesting option.

Both, compiled APK and open source code are available here: ROTATE EXODUX BOX SCREEN

 

Here at Exodux we can also set your OEM firmware to “original” mode from factory, please, contact us anytime.

EXODUX EX1 - IPTV SOLUTION

Amlogic S905L Quad Core 2Ghz

Pentacore GPU and Dual WiFi

1GB RAM (16-bits) - 8GB eMMC Storage

Supported real 1080p UI and 4K video

Exodux Android TV Box – EX1