android - How to send a LocalBroadcast from adb shell? -
I know how to send a broadcast from ADB shell if the Android manifest has been declared a static receiver in the file but what Is ADB a way to send localBrandcast from shell?
I think there is no way to achieve this, if it is true, how can I test a local broadcast effectively? Should I delegate the intentions of broadcasting a handler, whose behavior can be tested in isolation?
But is there a way to send localBradecast from ADB Shell?
No, because LocalBroadcastManager
is an in-process event bus, and the shell is not in your process.
How can I effectively test a local border?
Using an instrumentation test with a test suite, such as the JUNनेट, it runs in the same process as if you have a code code, and so be able to send it to local broadcasters. needed.
Should I intend to broadcast a handler whose behavior can be tested in isolation?
This is probably a good idea.
Comments
Post a Comment