Krishna Murthy
Krishna Murthy

Reputation: 41

How to broadcast an intent from UIautomator

I just want broadcast an intent using UI automator.

This question is something related to Uiautomator "am start"

But i am able to start intent using "am start -n Intent" but unable to start a broadcast intent using UIautomator like "am broadcast -a Intent"

Upvotes: 0

Views: 1029

Answers (2)

Diego Torres Milano
Diego Torres Milano

Reputation: 69388

From your test you can use

InstrumentationRegistry.getTargetContext().sendBroadcast(new Intent(...));

Upvotes: 1

Allen Hair
Allen Hair

Reputation: 1050

You can use Context.sendBroadcast(..) to broadcast an Intent.

Upvotes: 0

Related Questions