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: 93
Registered: ‎03-15-2011
My Device: Blackberry 9800
My Carrier: developer
Accepted Solution

How to bypass wifi and send a request through cellular network in blackberry 10

Hi,

 

I found that there is no way to switch on/off wifi in blackberry 10.

 

Now i want to bypass wifi and send a network request through cellular network if both are available.

 

Please let me know if  any api is there.

 

If api is not available then is there any way to implement this feature through socket programming?

 

Please provide any sample for the same.

 

Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: How to bypass wifi and send a request through cellular network in blackberry 10

Speaking as a user, can I ask why?

 

I can't think of any reason why I would like an app I install to bypass my nice 'free' wifi connection to send data over a possibly expensive cellular link?

 

 


If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Developer
Posts: 1,023
Registered: ‎03-20-2013
My Device: Red LE Developer Z10
My Carrier: Fido

Re: How to bypass wifi and send a request through cellular network in blackberry 10

I believe you can do this by retrieving the list of network interfaces, using them to determine the gateway used by the carrier network, then setting up a routing table that sends your traffic out the way you want. This requires a pretty good undertanding of general networking though.

 

I will not provide code samples as this is complicated stuff and to be frank I don't feel like spending time writing your code for you, but we are all more than willing to provide pointers along the way. As a starting point, look into the services provided by <bps/netstatus.h>.


BB_shi wrote:

Hi,

 

I found that there is no way to switch on/off wifi in blackberry 10.

 

Now i want to bypass wifi and send a network request through cellular network if both are available.

 

Please let me know if  any api is there.

 

If api is not available then is there any way to implement this feature through socket programming?

 

Please provide any sample for the same.

 






Developer of Built for BlackBerry certified multiFEED RSS/Atom feed reader and aggregator.  multiFEED Icon

Play nice: Clicking Like Button on posts that helped you not only encourages others to continue sharing their experience, but also improves your own rating on this board. Also, don't forget to accept a post if it solves your problem or answers your question.
Developer
Posts: 93
Registered: ‎03-15-2011
My Device: Blackberry 9800
My Carrier: developer

Re: How to bypass wifi and send a request through cellular network in blackberry 10

Thanks for reply... this is the requirement to send a request through cellular network... please let me know how to set up routing table?
Developer
Posts: 1,023
Registered: ‎03-20-2013
My Device: Red LE Developer Z10
My Carrier: Fido

Re: How to bypass wifi and send a request through cellular network in blackberry 10

I can't think of many, but I can tell you that my carrier's usage app will not work via WiFi (by design for security reasons). It would be nice if they had designed it to use the carrier network without needing to turn off WiFi first.


BBSJdev wrote:

Speaking as a user, can I ask why?

 

I can't think of any reason why I would like an app I install to bypass my nice 'free' wifi connection to send data over a possibly expensive cellular link?

 

 






Developer of Built for BlackBerry certified multiFEED RSS/Atom feed reader and aggregator.  multiFEED Icon

Play nice: Clicking Like Button on posts that helped you not only encourages others to continue sharing their experience, but also improves your own rating on this board. Also, don't forget to accept a post if it solves your problem or answers your question.
Developer
Posts: 93
Registered: ‎03-15-2011
My Device: Blackberry 9800
My Carrier: developer

Re: How to bypass wifi and send a request through cellular network in blackberry 10

This application is being developed for a carrier and it is needed to authenticate the request via carrier. Thats why it is required to send a request through cellular network only.

Please help.
New Member
Posts: 1
Registered: ‎12-05-2013
My Device: NOT OWNS
My Carrier: NONE

Re: How to bypass wifi and send a request through cellular network in blackberry 10

Well this is valid use case.

 

That is why other platform (Android, IOS,Window Phone) also gives this functionality.

 

In IOS and Window Phone(7.x,8) you can acheive it when you use socket communication and can set NEtwork preference (WIFI or Cellular)

 

In Android you can directly call WIFI ON, OFF ,MObiledata ON/OFF

 

Is Any of similar thing exists in BB10 and if some one point to proper document or link or sample , it will be highly appreciated.

Developer
Posts: 1,023
Registered: ‎03-20-2013
My Device: Red LE Developer Z10
My Carrier: Fido

Re: How to bypass wifi and send a request through cellular network in blackberry 10

Did you ever make any progress on this?


BB_shi wrote:
This application is being developed for a carrier and it is needed to authenticate the request via carrier. Thats why it is required to send a request through cellular network only.

Please help.





Developer of Built for BlackBerry certified multiFEED RSS/Atom feed reader and aggregator.  multiFEED Icon

Play nice: Clicking Like Button on posts that helped you not only encourages others to continue sharing their experience, but also improves your own rating on this board. Also, don't forget to accept a post if it solves your problem or answers your question.
Developer
Posts: 93
Registered: ‎03-15-2011
My Device: Blackberry 9800
My Carrier: developer

Re: How to bypass wifi and send a request through cellular network in blackberry 10

There is not much but I found an API CellularDataInterface. but this is supported from blackberry 10.2.
Developer
Posts: 123
Registered: ‎07-11-2011
My Device: 8900
My Carrier: Airtel

Re: How to bypass wifi and send a request through cellular network in blackberry 10

HI All,

 

I am also facing same problem.

Actually, bypassing is required for Authentication purposes that is depenedent on celluar network(In return we would get some id ype of thing).

As per my understanding, this will be possible through Socket Programming.Getting object of socket then binding through it cellular network.sending the request  over the network and get the result.

Any one can please help me in getting starting this.Or is there anyway, we can achieve for same.