tauri-apps / tauri-apps/tauri-docs

[request] Add Android TV Initial setup.

Open
#2,515 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

discuss enhancement
Dominant language
MDX
Stars
1.1k
Forks
887
Avg merge
2d 8h
Merged PRs (30d)
48

Description

Question you want answered

How to setup Tauri v2 to run on Android TV

Where did you look for an answer?

based on Android TV Getting Started, there some settings need to be added Tauri does not generate this things

on AndroidManifest.xml

First :

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

    <uses-permission android:name="android.permission.INTERNET" />
    ...other permission...
    <!-- add below setup, after permission before application -->
    <uses-feature android:name="android.software.leanback"
        android:required="false" />

    <application
       ...

Secondly:

<activity
    android:name=".TvActivity"
      ...other setup...
    android:exported="true"
    android:label="@string/your_label">
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        ...i dont set LEANBACK so i comment it...
        <!-- <category android:name="android.intent.category.LEANBACK_LAUNCHER" /> -->
    </intent-filter>
</activity>
To be notes

there is this warning, before upgrade please make sure to check tauri capability.

WARNING: We recommend using a newer Android Gradle plugin to use compileSdk = 34

This Android Gradle plugin (8.0.0) was tested up to compileSdk = 33.

You are strongly encouraged to update your project to use a newer
Android Gradle plugin that has been tested with compileSdk = 34.

If you are already using the latest version of the Android Gradle plugin,
you may need to wait until a newer version with support for compileSdk = 34 is available.

To suppress this warning, add/update
    android.suppressUnsupportedCompileSdk=34
Other consideration

thou i can run my app now, I still didn't explore hardware api for TV os fully but at least tauri command / invoke working properly.

Page URL

https://developer.android.com/training/tv/get-started/create

Additional context
Tested on Android TV (api 33)

ezgif-6-1dfe8a0c68

Are you willing to work on this yourself?
  • I want to work on this myself

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Android TV Getting Started page and the existing Tauri v2 Android setup documentation. Check how AndroidManifest.xml is generated and document the Android TV feature and activity settings shown in the issue, including any relevant caveats. Done means a newcomer can follow the documentation to run a Tauri app on Android TV.

Written by the indexing model from the issue text.

Assessment

Tech stack
android
Domain
documentation, mobile-dev
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.