I have a wifi rear view camera in my car. That camera creates a WIFI hotspot for my phone to connect with. If I put my car in reverse the app gets notified and switches to the app to show the camera view. But if i'm connected to the hotspot my phones internet doesn't work (duh) because the camera doesn't have any internet access.

I only want wifi for that specific app and my phone should use my 4g data, but I don't know how or if it is even possible.

My phone has android 9 and is rooted. Is this even possible? Because I read that on IOS this works by setting a custom dns (or something)...

  • 2
    The following question is a bit older but exactly asks for the same thing: Can an android phone connect to both WiFi and mobile data network at the same time?
    – Robert
    Commented Apr 10, 2020 at 15:43
  • If internet isn't reachable on WiFi and Mobile Data is turned on, OS automatically switches to Mobile Data. That's the default behavior, I think, not sure though. But after that, also not sure if hosts on WiFi are accessible or not. With root access however, you can automate the network routing table manipulation (using some init trigger, or listening to some uevent, or using some automation app) to get desired behavior, provided that WiFi and Mobile Data are turned ON at the same time (check "Mobile Data always active" in Dev Options). Commented Apr 10, 2020 at 18:54

1 Answer 1


You can try to automate the process. The following is accomplished using Automate. There are other apps you can use to get the same results.

  1. Create a new flow.
  2. On the Apps category (on the drawer), select App in foreground?. Set Proceed section to When changed. On the package section, select your app. Save it. Connect it to Flow beginning block.
  3. On the Connectivity category, select Wi-Fi set state. Save it. Set it to On'. Connect itsOKto theYes` of Step 2.
  4. On the Connectivity category, select Wi-Fi set state. Save it. Set it to `Off'.
  5. On the Connectivity category, select Mobile data set state. Save it. Set it to On'. Connect it to theOKof step 4 and to theIn` of Step 2.
  6. Save the flow by pressing the back button. Give it the necessary privileges. Click on Start.

Your flow will look like the image below. When you app is in the foreground, Wi-Fi will be enabled. When your app is the background, Wi-Fi will be disabled and mobile data enabled.

Disclaimer: I am just a user of the app.


  • I use that app a lot, but I don't think this is gonna work. The camera sends via WIFI a request (don't know specific) and the app show the view of the camera. So this diagram isn't going to work because the app is in the background... Maybe I can make something so that automate checks my speed en based on that switches to wifi of data. Commented Apr 24, 2020 at 14:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .