Skip to content

Add aggressive activity fallback for apps missing Leanback intent#34

Open
evanofficial wants to merge 1 commit into
Trooped:mainfrom
evanofficial:fix/leanback-intent-fallback
Open

Add aggressive activity fallback for apps missing Leanback intent#34
evanofficial wants to merge 1 commit into
Trooped:mainfrom
evanofficial:fix/leanback-intent-fallback

Conversation

@evanofficial
Copy link
Copy Markdown

Summary

  • Adds a new fallback step (step 4) in getBestLaunchIntent() that queries PackageManager.GET_ACTIVITIES to scan all declared activities when standard intent resolution fails
  • Prioritizes exported activities with entry-point keywords (main, splash, tv, leanback, launcher, home) before falling back to the first available activity
  • Handles API level differences for getPackageInfo (Tiramisu+ vs legacy)
  • Existing resolution steps (1-3) and the Amazon Prime Video special case (now step 5) are completely untouched

Testing notes

I don't have an Android TV device to verify the fix end-to-end with a problematic app like OdidoTv. Would appreciate if someone with access to a device and a known-failing app could validate.

Fixes #31

Some third-party apps (e.g. telecom/provider apps) omit the standard
CATEGORY_LEANBACK_LAUNCHER intent, causing QuickBars to fail with
"no launchable activity". This adds a new fallback step that queries
PackageManager for all declared activities and picks the best entry
point by scanning for common names like main, splash, tv, or launcher.

Fixes Trooped#31
@ffhjansen
Copy link
Copy Markdown

Is there a way i can assist in this?
I have some technical skills but am no programmer/developer so i am not sure how to test this/get this fix on my chromecast.

@evanofficial
Copy link
Copy Markdown
Author

Is there a way i can assist in this? I have some technical skills but am no programmer/developer so i am not sure how to test this/get this fix on my chromecast.

Thanks for offering! If you can sideload apps on your Chromecast, you could test by installing an app that's known to crash at launch (OdidoTv is the one mentioned in the issue). If it opens successfully after this fix, that's the validation I need. No coding required — just install and launch.

@ffhjansen
Copy link
Copy Markdown

Hi i feel so stupid but where (or how) can i download the QB apk with the fix to test?
Been searching but didn't find it.

@ffhjansen
Copy link
Copy Markdown

Hi i feel so stupid but where (or how) can i download the QB apk with the fix to test? Been searching but didn't find it.

@evanofficial can you point me in the right direction?

@evanofficial
Copy link
Copy Markdown
Author

No worries! There's no automated build for PRs on this repo, so there isn't an APK to download yet. I'll build one from this branch and attach it to a release on my fork — give me a bit and I'll drop a link here you can install directly on your Chromecast.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Launch failure for apps missing Leanback intent (no launchable activity)

2 participants