0

I upgraded compile and target sdk to API 33, it seems there are a lot of changes in manifest, I'm constantly getting lint error - missingLeanbackSupport,

/bitrise/src/app/src/main/AndroidManifest.xml:2: Error: Expecting an activity to have android.intent.category.LEANBACK_LAUNCHER intent filter [MissingLeanbackLauncher]

while I have disabled it in manifest, but still

  <uses-feature
    android:name="android.software.leanback"
    android:required="false" />
<uses-feature
    android:name="android.hardware.touchscreen"
    android:required="true" />

is there any way to disable Android tv support from code? If I use LEANBACK_LAUNCHER for my splash screen it can't be run api 33 (but it works on 32 and below)

 <activity
        android:name=".splash.SplashActivity"
        android:autoRemoveFromRecents="true"
        android:exported="true"
        android:launchMode="singleTask">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LEANBACK_LAUNCHER" />
        </intent-filter> ...

is there any way beside ignoring this error in lint ?

3
  • Could you elaborate a little bit more on what are you trying to achieve with your TV module and why are you so reluctant to use Android TV support? Commented Nov 24, 2022 at 19:51
  • I have tried multiple configurations to determine what is your case, but I did not run into a problem with the tv app launch on API 33. From Android docs you can read that what you are trying to achieve is not eligible: "Caution: If you do not include the CATEGORY_LEANBACK_LAUNCHER intent filter in your app, it is not visible to users running Google Play on TV devices. Also, if your app does not have this filter when you use developer tools to load it onto a TV device, the app does not appear in the TV user interface" Commented Nov 24, 2022 at 19:53
  • @Kostek thank you for response, I don't support android tv at all, its general android application Commented Nov 24, 2022 at 20:21

1 Answer 1

0

I had run some tests and it appeared to me that having 'androidx.leanback:leanback:1.0.0' dependency in your build.gradle (:app) file or

<uses-feature
    android:name="android.software.leanback"
    android:required="false" />

in your AndroidManifest.xml file causes lint to suspect that you are deploying TV module and therefore it is forcing you to define LEANBACK_LAUNCHER.

Check if it is your case and delete them from your code.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.