Connection over WiFi not Cellular

As I am new in programming apps, you maybe laugh about my problem ...

I have build something like a Photobooth Software wich uploads Pictures to a NAS using Taifun's FTP Extension. If my Phone is only connected to my WiFi, it works fine, but if I have a connection to the Internet via Cellular Mobile Network, the FTP wents the wrong way.

How can I solve this routing problem. Is there a way, to tell my App, that it has to use the WiFi Connection only?

Thanks for your help.

you might want to use the wifi extension and its SSID method to find out, if you are connected to your WiFi


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

My device is connected to a local WiFi (without Internet Connection). If I switch off Cellular Data Network, it works fine, but if it is switched on, the FTP Extension seems to use the Celluar Connection instead of WiFi. I tried to switch off Cellular Network in the rules of the App, but without effect. If my WiFi-Router is connected to the Internet, it also works.

So I think, I have to tell my app internal, that it should only use WiFi for the FTP Upload, no matter if there is a Internet-Connection or not.

As I can't solve my problem, I maybe have another idea: Is it possible to switch off the Cellular Data Connection while using my app?

you might want to use the activity starter, see this stackoverflow answer