Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[request] Add Android TV Initial setup. #2515

Open
1 task done
zonblade opened this issue Aug 8, 2024 · 0 comments
Open
1 task done

[request] Add Android TV Initial setup. #2515

zonblade opened this issue Aug 8, 2024 · 0 comments
Labels
discuss Does this require further discussion before it's dealt with? enhancement Does it add or improve content?

Comments

@zonblade
Copy link

zonblade commented Aug 8, 2024

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
@zonblade zonblade added discuss Does this require further discussion before it's dealt with? enhancement Does it add or improve content? labels Aug 8, 2024
@github-project-automation github-project-automation bot moved this to 🪵 Backlog in Documentation Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss Does this require further discussion before it's dealt with? enhancement Does it add or improve content?
Projects
Status: 🪵 Backlog
Development

No branches or pull requests

1 participant