Can I trick Android devices into thinking that wifi has internet connection?

Viewed 863

I have a custom made device that has a wifi module. I made an android app that connects to the device. Because my device has no internet connection, when I try to send something to the device from app, the android starts sending data over mobile network (because WiFi has no internet connection). Is there a way to trick the Android into thinking that my wifi has internet connection? Or maybe do something on the app that will ensure that the app uses wifi only?

Main problem is when mobile data is turned on and android is connected over wifi to my device. If I turn mobile data off, then it works normal. But I don't want to do that everytime I open my app.

0 Answers
Related