Hi,
We have an issue closing our application using the Host.Local.CloseApplication function.
While testing regular windows application it works as expected and closes the application.
But on Android, it seems to only close the UI.
When we then execute Host.Local.RunMobileApp, the application seems to resume instead of restarting.
We have a "dirty" workaround for using adb shell am force-stop <app_name> but we would prefer using Ranorex function.
Is that a bug in the Ranorex Android Automation Service?
Is there any other way to do this?
Thank you.
Android App close issue with Host.Local.CloseApplication
Android App close issue with Host.Local.CloseApplication
Hugo Trudel
Software Engineer
Distech Controls Inc
Software Engineer
Distech Controls Inc
Re: Android App close issue with Host.Local.CloseApplication
Have you tried the Ranorex.Host.KillApplication(Element) function?
http://www.ranorex.com/Documentation/Ra ... cation.htm
CloseApplication will be limited to only being able to do what the app does on close. Some apps just minimize the display, some kill the process. Close doesn't do anything but tell the app to use its own close mechanism.
Kill (if it works in Android, I'm not sure), should actually end the process. But, again, it may not work on Android.
http://www.ranorex.com/Documentation/Ra ... cation.htm
CloseApplication will be limited to only being able to do what the app does on close. Some apps just minimize the display, some kill the process. Close doesn't do anything but tell the app to use its own close mechanism.
Kill (if it works in Android, I'm not sure), should actually end the process. But, again, it may not work on Android.
Shortcuts usually aren't...
Re: Android App close issue with Host.Local.CloseApplication
I just tried it and the behavior is the same as for Host.Local.CloseApplication.
I have asked our Android app developers and their explanation is that Ranorex Automation Service sends a flag activity "Clear Top", which is equivalent as clicking Android Device Home button to pause an App.
My question is this:
Is this the desired behavior for the Ranorex Automation Service Host.Local.CloseApplication and Host.Local.KillApplication?
Thanks.
I have asked our Android app developers and their explanation is that Ranorex Automation Service sends a flag activity "Clear Top", which is equivalent as clicking Android Device Home button to pause an App.
My question is this:
Is this the desired behavior for the Ranorex Automation Service Host.Local.CloseApplication and Host.Local.KillApplication?
Thanks.
Hugo Trudel
Software Engineer
Distech Controls Inc
Software Engineer
Distech Controls Inc
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Android App close issue with Host.Local.CloseApplication
Hi,
You are right it is currently, with Ranorex 4.1.5, not possible to completely close the app.
This feature should be available with Ranorex 5.0.
Regards,
Markus
You are right it is currently, with Ranorex 4.1.5, not possible to completely close the app.
This feature should be available with Ranorex 5.0.
Regards,
Markus
Re: Android App close issue with Host.Local.CloseApplication
I have now had the chance to try it with Ranorex version 5.0.2 and it seem to work on Android.
However, it does not work on iOS...
Getting there someday!
However, it does not work on iOS...
Getting there someday!

Hugo Trudel
Software Engineer
Distech Controls Inc
Software Engineer
Distech Controls Inc
Re: Android App close issue with Host.Local.CloseApplication
htrudel, 5.1 was just release, you might try it to see if it works better for iOS.
Shortcuts usually aren't...