Hi,I am running the device in Airplane mode.Before I start the test, I reboot the phone using adb commandWhen the phone starts, it brings up to the front a message box asking if you want to disable airplane mode.solo.getCurrentActivity will return my app activity that is on the background. But I can't get the app to go foreground.How can I interact with the system message box to close it?or how can I put my app on the foreground?
solo.goBack() exits my app
that does not work, I getjunit.framework.AssertionFailedError: No Activity named: 'com.myapp.myactivity' has been priorly openedat com.jayway.android.robotium.solo.ActivityUtils.goBackToActivity(ActivityUtils.java:274)at com.jayway.android.robotium.solo.Solo.goBackToActivity(Solo.java:2072)at com.myapp.test.Test_firstStart.setUp(Test_firstStart.java:63)at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:190)at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:175)at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:555)at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1614)it depends on what phone you are using. For some of them that I have, if you set Airplane mode, when you boot your phone it will show this popup on the top of everything, asking if you want to disable airplane mode. I need to get ride of it, because of it robotium can't see anything about the activity it launched.
Hi Naveed, no luck with this. The message stays on the top. The app activity is not brought to the front.Thank you for trying to help
Hi Naveed, you can get my app on googleplay its name is "slacker"If you don't live in the US or Canada you won't be able to use it.My test code is tightened to the source code, and I cannot disclose it. However I don't think this is related to the app itself.My problem I think is more generic and is about the device system.if you set your phone in airplane mode, when you reboot some phone will display a system popup. The idea would be to be able to get a handle on the the system popup to close it.That said, more I think about it more I don't think it is possible.Instead, I would have to do some external work like sending keystrokes via adb, eventually detect the popup via screenshot etc... it looks terrible to do...Another popup that display also on a particular phone is a crash debug overlay popup. Same think, the only way to get ride of it is to manually press the ok button