Closed lavafroth closed 1 week ago
In addition to this, would you be open to using monkeyrunner to start an activity in the case where a user supplies a package name without an intent? Alternatively we could just default to MainActivity
which applies to most apps.
Thanks for the PR, can you add this feature to adb_client
as well ?
Currently it is only available to the CLI.
I would have seen something like run_application
that only takes a package name as parameter and run_activity
that takes both package name and activity to start. run_application
could call run_activity
with default activity name.
What do you think about it ?
Sure, I can add this to the library side. Please correct me if I'm wrong but to extract the default activity of an app, we'd first need to parse its apk, right?
As a library we let users fill these two fields, users will have to know what main activity names their applications have.
APK parsing could be done using other libraries
I have edited the PR description to reflect the changes committed.
Changes
LocalCommand
andUSBCommand
now have respective variants for "run"am start INTENT
run_activity
forADBDeviceExt
run_activity
requires a package name and an associated activity to invokerun_activity
which invokes an intent using theam start
command.Closes #16