Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Posts: 16
Registered: ‎09-17-2012
My Device: Developer

How does BlackBerry decide what Internet connection to use?

So I am developing a hotspot app that allows users to connect to a hotspot. However, it seems that the BlackBerry 10 OS has some sort of algorithm for determining how it wants to connect to the Internet. For example, I may be connected to wifi through a hotspot, but not logged in (so I always get redirected to the hotspot login page), but if I have a mobile connection turned on, the OS decides to bypass the wifi connection and use the mobile one instead. Normally, if you are online on a private wifi network, the OS will pick the wifi one over the mobile network if it's turned on. But I want my app to use the wifi connection when getting login details and authentication of a hotspot even if the mobile network is turned on and connected because if the OS chooses to use the mobile network connection, it will skip the redirect to the login page and just show the Internet page as it is. Is there some way to bypass the mobile network connection or override this behavior?

 

I wanted to try telling the QNetworkAccessManager to use the appropriate QNetworkConfiguration that goes over WLAN, but it almost never appears to be available even if I have both Wifi and the mobile network turned on and connected to the appropriate networks.

Developer
Posts: 541
Registered: ‎05-17-2009
My Device: Not Specified

Re: How does BlackBerry decide what Internet connection to use?

[ Edited ]

There's no way to programatically select the internet connection used for network calls with QNetworkAccessManager. What I have done instead is throw up a dialog if it's detected that the user has a mobile connection enabled, along with a link to network settings so the user can turn of the mobile connection manually. No users of my applications have ever complained about this.