Difference between revisions of "Android"
(New Android Page)
Revision as of 15:46, 18 September 2018
There are many Android TV devices now available. Mythfrontend now has support, as from version 30, for Android and Android TV devices. The NVidia Shield works well with MythTV. Hopefully we will test and get feedback on other devices and include the results here.
|NVidia Shield TV|| Good support. MythTV has been optimized for this device.
Some MPEG2 content from Network TV stations in the USA suffers from pixellation every few seconds due to a bug that exists in all NVidia devices. The solution is to use software decoding in those cases.
4K videos can be played, but are scaled down to 1920x1080, even on 4K displays and TVs.
|Amazon Fire TV stick||Poor support. 720p content plays acceptably. 1080i content has color problems, stuttering playback and interlace problems. We will be working on fixing this.|
The Android package supports Android version 5.0 (Lollipop) or later. It comes in 32 bit and 64 bit packages. For NVidia Shield, the 64 bit package is recommended.
Setup on Android
First you need to have a MythTV backend set up on your local network. The Android device will function as a remote frontend. It is best to use a wired connection, rather than wifi, especially if you are playing High Definition content.
MythFrontend is not available in the play store at this time. You can download a package or build it yourself. To build it yourself see instructions at https://github.com/MythTV/packaging/tree/master/android.
Download the package (apk file) from https://dl.bintray.com/bennettpeter/generic/ . There is a directory for each version (Currently only version 30) and under that directories for 32 bit and 64 bit versions. For NVidia Shield select the 64 bit one.
There are various ways of installing the apk on Android. If you have a browser on your android device you can simply download to there and let it install. You can also use a variety of Android apps to do this. However I recommend using adb as follows:
- Enable installation of apps from unknown sources.
- Enable developer options on your android device as described in https://developer.android.com/studio/debug/dev-options.
- Enable USB Debugging in your android device. This will also enable debugging via the network (wifi or ethernet).
- Install adb on your Linux (or windows) computer. On Linux you can use your distribution package manager to install adb. On other environments, or if your distribution does not have adb, find it at https://developer.android.com/studio/releases/platform-tools.
- Find the ip address of your android device, either from the device itself or from your router. I recommend you set a reserved address in your router so that your device always gets the same ip address.
- On your computer, connect to the android device:
adb connect ip_address
- On your computer, run the command to install:
adb install -r package.apk
- After installation, if you do not see the application on the front screen, run it from the apps list in settings. After that it should show in your favorites.
If you previously installed a debug mythfrontend package or one signed by a different certificate, you will get an error. In that case you have to uninstall and reinstall mythfrontend.
When you install mythfrontend an identifier is created for your frontend, in the format android-xxxxx where xxxxx is a random string of hexadecimal numbers. If you ever uninstall and reinstall mythfrontend, a different set will be created. This means your settings in the database will need to be recreated. You can avoid this problem by setting a custom id in the frontend. In Setup -> General -> Database Configuration ->Use Custom Identifier. Enter a name for the frontend here. Exit and restart for the setting to take effect. Any settings previously created for that name will be used after a restart.
Video Playback Profile
The "Mediacodec Normal" profile is best for most cases. For a high-powered system such as a Shield, the OpenGL profiles can also be used if you have problems with Mediacodec, but in many cases they will impose too high a load and the playback will stutter.
OpenSLES audio is the only one that works with Android.
If you have a sound system that can decode AC3, DTS, etc., digital audio can be passed through. To pass through digital audio, go into settings -> Display and Sound -> Advanced -> Surround Sound on the Android device, and select "Always". Then also go into MythTV Setup -> Audio -> Digital Audio Capabilities, and select the types of pass-through desired.
Android TV devices normally come with a remote. However you will need to setup your remote keys to activate appropriate actions in the frontend. Do this with Frontend Setup -> Edit Keys. Many actions will already work in the frontend, such as exit, arrow keys. There may be other remote keys that do not work as you expect. You can map keys to any action desired.
For limited remotes (i.e. remotes with very few buttons) such as the NVidia Shield remote, there are some new features designed to help.
- Long Press. You can set up to 16 keys to have two actions, a normal action that occurs when a key is pressed and a "long press" action for when the key is held down for a second. In Edit Keys you can add any keys you wish to context Long Press. Note that keys added here will lose any auto-repeat capability they have, so it is not advisable to set arrow keys to long press because that will slow down your browsing through lists of recordings, etc. After setting Long Press to a key, you have to exit Edit Keys and go in again before you can assign long press of that key to an action. I recommend you set Long Press Enter to Global Menu. This will mean you can always get to a menu, if your remote does not feature a Menu button.
- OSD Navigation. In the TV Playback context there is a new action called OSDNAVIGATION. If you assign a key to this, then upon pressing that key during playback you will get an on screen navigation pane with the ability to jump, pause, fast forward, etc. We recommend you set the Enter button (normally a big button in the middle of the arrow navigation on the remote) to OSD Navigation.
On Nvidia Shield you can also plug in a USB remote that simulates a keyboard, such as the Ortek remote.
Some android TV devices include CEC support. This does not use the MythTV built in CEC support, but acts like a generic remote that simulates a keyboard. You can use your TV remote to control MythTV. Assign actions to keys using the Edit Keys settings, including Long Press if needed.
MythTV operation is the same as on other environments when using a remote or a keyboard to control it.
When exiting MythTV I recommend that you use the return button and reply to the Exit MythTV prompt. If you use the Android Home button, MythTV continues running in the background. MythTV will prevent your backend from shutting down. It may not recover quickly when brought to the front again. This may be improved in future.
If you install MythTV on a phone or a tablet, you may want to use the touch screen to control it. The touch screen support is rudimentary. See MythTV on Android for some information on gestures that can be used.