Android Question wifi and mobile connection

defillo

Member
Licensed User
Longtime User
I have this problem.

Device connected in wifi to an esp module, obviously without internet connection
I need to retrieve data from an ftp server using mobile data connection, but seems the device only use the wifi with no success, ignoring the mobile data channel

Any suggestion? wifi connection cannot be interrupted, must be always stay on..
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0

defillo

Member
Licensed User
Longtime User
This is a difficult task to solve and is unlikely to work reliably.
In most cases the OS will actually prefer the connection with active internet.

You can try to give a hint to the system to prefer a specific connection: https://www.b4x.com/android/forum/threads/mqtt-chat-network-error.90892/#post-574610
You cannot switch between two connections.
I've already tested the suggestion you gave, but as you say it's not reliable. seems to be a no-solution problem. In my case the device always prefers the wifi connection without active internet. and it's pretty stupid even when the ftp request is obviously sent to the web....
better search for a different approch..
 
Upvote 0
Top