Page 1 of 1

Using Android Api

Posted: Thu Nov 28, 2013 4:06 pm
by n.chekasheva
Hi,

I have the next question,

I want to use Android Api in my test, e.g using C# script
Do I have such opportunity?
If yes, which library can i use?

I want e.g. disable wifi on my phone..

Re: Using Android Api

Posted: Mon Dec 02, 2013 2:37 pm
by krstcs
There is currently no way to disable WiFi on an Android (or iOS) device using Ranorex.

Ranorex does not have access to internal Android functions. You could write a small Android app that wraps that functionality and instrument it with Ranorex. Then you could use that wrapper app to turn WiFi on/off as needed.

Re: Using Android Api

Posted: Tue Dec 03, 2013 9:48 am
by n.chekasheva
Thank you for your answer,

For e.g. I have a small apk which disables wifi on the phone...
How can I instrument it with Ranorex?
Or can I manage this apk FROM Ranorex during my test passing (preferably in the background)?

Are you sure that I cannot use a special library like dot42 for connecting Android api to my c# test?

Re: Using Android Api

Posted: Thu Dec 05, 2013 11:36 am
by Support Team
Hello.

Unfortunately Ranorex is currently not able to deactivate, e.g., WiFi, unless there is no dedicated element available on the UI which would perform such an action.
If you are able to implement, e.g., a button to enable/disable WiFi, Ranorex could touch this button and the intended action is performed by your own app.

The usage of some library like dot42 also would not solve the problem, because the Ranorex C# code (e.g., within a code module) is not deployed to your Android device. Ranorex only communicates with the Ranorex Service App to send or retrieve messages.

Kind regards,
Christian

Re: Using Android Api

Posted: Wed Jan 22, 2014 11:27 am
by Rhett
Ranorex does not have access to internal Android functions. You could write a small Android app that wraps that functionality and instrument it with Ranorex.