In my flutter app, I need to get information from a device via wifi as a stream. Also I need to keep my google maps online via Mobile internet. How can I use both wifi and mobile network at the same time in my phone. I made a lot of search but I can't find any solution for this.
-
A phone uses one or the other. It doesn't keep wifi and mobile data going at once. But Google maps will work over wifi as well, so this is a non-issue. – Gabe Sechan Nov 18 '21 at 17:12
-
Yeah, Google maps should be using Wi-Fi so I am not seeing what the issue is here? – Always Learning Nov 18 '21 at 18:31
-
Not sure how to do this with flutter, but this is possible on Android in general. https://stackoverflow.com/questions/29835240/how-to-stay-connected-through-mobile-network-after-wifi-is-connected-on-android Note: You can only force _your app_ to use mobile + wifi data. Other apps will use whatever network the Android OS decides to use. Also, pretty much all devices handle offline Wifi connections differently. Some will keep the connection, some will ask the user if they want to disconnect and use mobile data. Its a mess. – Alexander Hoffmann Nov 19 '21 at 22:42
-
I also had to deal with this issue here: https://stackoverflow.com/questions/59660494/connect-to-an-offline-wi-fi-and-keep-using-mobile-data-for-all-other-apps-too – Alexander Hoffmann Nov 19 '21 at 22:44
-
This device will be in a vehicle and wifi is not available in vehicles. My aim was recieving data from taximeter and refresh map from mobile internet at the same time. – mehmet akif sayrım Nov 24 '21 at 14:52
-
I decided to get data from taximeter with ssid. It works but not refreshing as I imagined. Is there any way that I can get ssid of taksimeter as a stream without delay? – mehmet akif sayrım Nov 24 '21 at 14:55
2 Answers
I don't think it's possible.
The phone would need two network antennas and possibly two network adapters.
You can surely toggle both wifi and mobile data at the same time and they can probably switch frequently to optimize your connection or send requests to different services.
But you can't really use them both at the same time.
(if it's possible) I don't recommend it, since a majority of phones will not support this feature since you need two network antennas.

- 3,128
- 2
- 13
- 33
-
-
After 24 hours research, I wanted to be sure that is impossible. Thanks for the answer. – mehmet akif sayrım Nov 19 '21 at 06:21
-
i haven't tested it myself, but what about using the phone as a hotspot? I put an answer up above, but I haven't tested it myself and thought I would check with others. If the phone is configured to be a hotspot, it creates a WiFi network other devices can connect to so they can piggy back off your phone's internet connection. I don't think the original question was asking to use internet from two sources, but talk to a device over WiFi while maintaining internet access. Do phones prevent Apps from connected to both networks while the phone is configured as a hotspot Wifi network? – Jordan Jan 28 '23 at 07:18
From the facts as presented, there are a couple of possible solutions, but they aren't perfect and I'm guessing on one as I haven't tested it yet.
One, Google Maps has an offline mode. You can set it up to download maps for offline use. It will show your position on the maps whether you are connected to the internet or not, but you won't get traffic data or accurate travel times. Not great, but it can work.
Two, it is possible for a phone to have a WiFi network and Cellular network active at the same time, but not in the way everyone seemed to think. Since you are wanting the cellular connection open to have access to the internet, I'm assuming this is because the WiFi network you want to access doesn't have the internet. So, reverse the WiFi network. Setup your phone to be a hotspot network, it runs its own WiFi network while maintaining access to the internet through its cellular network. I'm guessing here, but unless phones have some specific security protocol forbidding it I don't know about (which can be the case), your app should be able to contact anything connected to its phone's WiFi while still having access to the internet.
If this doesn't work for some reason, you can try a trick I used when I set up a car office. Get a mobile hotspot device. It's a device you can put a cellular SIMM in and it creates a WiFi hotspot. You can connect to it, along with other devices in the car. All will being using WiFi and the hotspot will provide the internet access.
If what you are connected to can only create a WiFi network for you to access and it can't be configured to connect to one itself, you could technically still be able to do it by network switching. Much harder to do (probably impossible on some devices) and will likely mess with other apps depending on internet access, so a real break glass in case of emergency type of situation there.

- 711
- 1
- 6
- 12