Open yusufyildirim opened 9 months ago
I dug into the problem yesterday and found that this line is the issue here: https://github.com/mobile-dev-inc/maestro/blob/main/maestro-android/src/androidTest/java/dev/mobile/maestro/MaestroDriverService.kt#L104
I'll create a PR but not sure what the correct approach should be.
The easiest solution seems to looking for getLeanbackLaunchIntentForPackage if getLaunchIntentForPackage returns null as a fallback option but it's a bit problematic. I can technically have two different intents one with CATEGORY_LAUNCHER
and the other with CATEGORY_LEANBACK_LAUNCHER
and Maestro would always launch the one with CATEGORY_LAUNCHER
in this case. This makes me lean towards expecting a flag or argument from the user via CLI or anything of that sort.
Looking for your ideas here, thanks!
Describe the bug Maestro is unable to launch Android applications if they don't have CATEGORY_LAUNCHER for their activity in AndroidManifest. Android TV specific applications typically have CATEGORY_LEANBACK_LAUNCHER instead and Maestro is not looking for that.
CLI throws an error like this when it fails:
Unable to launch app com.your.app: UNKNOWN
To Reproduce
maestro test your_test_file.yaml
Expected behavior App should launch on the Android TV emulator
Environment information (please complete the following information):