How to handle external application activity in android using robotium

0
0

I am trying to automate android app(Relocation services)using robotium. In this app there are media section and email and phone native dialer options so when i click on any of this option(Video, audio, phone, email) it takes you to the native app(video,audio, phone, email) of the phone. So how to handle external application activity using robotium(Like click on back button to come back to my app, or close native camera or video app to come back to my app)

Any answer will be great help.

  • You must to post comments
0
0

I think, Using Robotium you can’t access other application resources from your target testing application.

Just use Instrumentation for this,

Instrumentation inst = new Instrumentation();
inst
.sendKeyDownUpSync(KeyEvent.KEYCODE_BACK);

But be sure if you are doing this in Activity then put this in separate thread for run this code..

  • You must to post comments
Showing 1 result
Your Answer
Post as a guest by filling out the fields below or if you already have an account.
Name*
E-mail*
Website