Skip to content

Google TV options not in flet command line #2923

Open
@syleishere

Description

@syleishere

Currently no options to flet to set google TV icon, as well as leanback launcher not included in AndroidManifest.xml as well as intent filters needed. These could be added without affecting anything. Main thing about google TV is the leanback launcher lines are enabled, intent lines, as well as adding option to flet command line to tell users where Google TV icon is.

Here is example of mods needed to AndroidManifest.xml as well as a link for google TV docs. Below are the bare minimum needed to work, without icon it won't be selectable on google TV.

https://developer.android.com/training/tv/start/start

An example edit to AndroidManifest.xml:

            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
                <category android:name="android.intent.category.LEANBACK_LAUNCHER"/>   <!--For google TV-->
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>

Modify intent filter

 <!--these 2 for google TV first one says don't ONLY use google tv(leanback), second one says does not require a touchscreen -->
    <uses-feature android:name="android.software.leanback" android:required="false" />
    <uses-feature android:name="android.hardware.touchscreen" android:required="false" />

Set google TV icon

<application
    ...
    android:icon="@mipmap/ic_launcher"
    android:banner="@drawable/banner" >
    ...
</application>

With above example you would copy flet users banner.png file to android/app/src/main/res/drawable/banner.png
for example.

Testing application:(enable USB debugging etc..)

For TV:
adb tcpip 5555
adb connect 192.168.0.160:5555 (Use your IP, go allow on TV now)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementImprovement/Optimizationfeature requestSuggestion/Request for additional feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions