Hi guys,
I ran into an issue when testing an app. I appreciate that very much if any
one can help me out.
It's an app that installs apps for users.
What it does is simply to send out an intent very much like this:
URI uri = ...; // uri to apk
intent = Intent(Intent.VIEW_ACTION, uri);
intent.setType("application/...");
startActivity(intent);
After this, Android will pop up an activity asking user whether to install
the app or not.
So far, it's fine.
Problem is, when testing the app automatically, I found I can't dismiss the
activity created by Android.
I tried creating a monitor to monitor it, like:
IntentFilter filter = new IntentFilter(Intent.VIEW_ACTION,
"application/..."); // line 1
ActivityMonitor am = new ActivityMonitor(filter, null, true); // line 2
Activity activity = am.waitForActivity(); // line 3
Unfortunately, line 3 never returns and the consequence is I can't dismiss
the activity.
Please help...
Thanks,
Steven Y.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en