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
New Contributor
yoginih
Posts: 9
Registered: ‎08-22-2011
My Device: 9700

Get available wireless access point and connect to it.

Hi all,

Anyone know how we scan available access point and connect to it?

I found this API documentation

 

http://developer.blackberry.com/native/reference/core/com.qnx.doc.wifi_service.lib_ref/topic/manual/...

 

But its just list of available function. I dont know where to start it. Is there any sample to do it?

 

Kindly advise.

Thanks before.

Please use plain text.
BlackBerry Development Advisor
sabdelsayed
Posts: 249
Registered: ‎08-17-2012
My Device: BlackBerry Z10 and Q10

Re: Get available wireless access point and connect to it.

Hi yoginih,

 

Here are some forum posts where this question has been addressed before. Hope it helps.

 

http://supportforums.blackberry.com/t5/Native-Development/Connected-to-Wifi-check/m-p/2476989#M27155

http://supportforums.blackberry.com/t5/Native-Development/Data-network-availibility-signal/m-p/24770...

http://supportforums.blackberry.com/t5/Native-Development/How-to-check-whether-internet-is-enbled-or...

 

Hope that helps!

@SamarAbdelsayed

Did this answer your question? Please accept post as solution.
Please refrain from posting new questions in solved threads.
Found a bug? Report it using the Issue Tracker
Please use plain text.
New Contributor
yoginih
Posts: 9
Registered: ‎08-22-2011
My Device: 9700

Re: Get available wireless access point and connect to it.

[ Edited ]

Thank you for the response sabdelsayed. =)

 

The link that you had given is not cover all what i need.

I would like my app to be able to interact with Wi-Fi on blackberry 10 devices. More specifically:

  • Passively react to scans
  • Iterate available hotspots and connect to a specified one
  • Save/access/delete hotspot configurations

Is it possible to make that kind of app with cascades?

Please use plain text.
BlackBerry Development Advisor
sabdelsayed
Posts: 249
Registered: ‎08-17-2012
My Device: BlackBerry Z10 and Q10

Re: Get available wireless access point and connect to it.

[ Edited ]

Hi yoginih,

 

  • Passively react to scans

--> your app can scan for available WiFi connection and if found performs downloads/uploads etc.

 

  • Iterate available hotspots and connect to a specified one

--> Unfortunately, currently there is no way for your app to retrieve the WiFi SSID name. And hence, your app cannot connect to a specific WiFi hotspot

 

  • Save/access/delete hotspot configurations

--> This is not possible due to security considerations

@SamarAbdelsayed

Did this answer your question? Please accept post as solution.
Please refrain from posting new questions in solved threads.
Found a bug? Report it using the Issue Tracker
Please use plain text.
New Contributor
yoginih
Posts: 9
Registered: ‎08-22-2011
My Device: 9700

Re: Get available wireless access point and connect to it.

Hi sabdelsayed,

 

I found this API reference, it state

 

"The APIs support hotspot aggregator applications that can configure Wi-Fi profiles and receive aggregator specific event notifications to allow connection at Wi-Fi hotspots on the user's behalf."

 

Whether those API was not able to make what I want using cascades? 

Please use plain text.
BlackBerry Development Advisor
sabdelsayed
Posts: 249
Registered: ‎08-17-2012
My Device: BlackBerry Z10 and Q10

Re: Get available wireless access point and connect to it.

[ Edited ]

Hi yoginih,

 

The newly added (10.2) wifi service library allows WiFi aggregator apps to configure/access wifi connections to allow users to connect to hotspots. Are you a hotspot aggregator developing such an application? If yes, then before you can use those functions to retrieve such Wifi connection information is to register your application as an aggregator application by calling wifi_aggregator_register(). This link has more information for you on starting such process: 

 

http://developer.blackberry.com/native/reference/core/com.qnx.doc.wifi_service.lib_ref/topic/wifi_ag...

@SamarAbdelsayed

Did this answer your question? Please accept post as solution.
Please refrain from posting new questions in solved threads.
Found a bug? Report it using the Issue Tracker
Please use plain text.
Developer
smiley
Posts: 1,473
Registered: ‎07-14-2008
My Device: Z10

Re: Get available wireless access point and connect to it.

Not related but can 10.2 able to turn on and off wifi now?  thanks

Please use plain text.
BlackBerry Development Advisor
sabdelsayed
Posts: 249
Registered: ‎08-17-2012
My Device: BlackBerry Z10 and Q10

Re: Get available wireless access point and connect to it.

[ Edited ]

Hi smiley, your question is actually related to the original post. The update that came out in 10.2 allows apps that are registered as aggregator apps to turn on/off wifi networks.

@SamarAbdelsayed

Did this answer your question? Please accept post as solution.
Please refrain from posting new questions in solved threads.
Found a bug? Report it using the Issue Tracker
Please use plain text.
Developer
smiley
Posts: 1,473
Registered: ‎07-14-2008
My Device: Z10

Re: Get available wireless access point and connect to it.


sabdelsayed wrote:

Hi smiley, your question is actually related to the original post. No, the update that came out in 10.2 only allows certain apps that are registered as aggregator apps to turn on/off wifi networks.


so how do we register our apps? is there a process like "Headless" where we need approval from BB?

Please use plain text.
BlackBerry Development Advisor
sabdelsayed
Posts: 249
Registered: ‎08-17-2012
My Device: BlackBerry Z10 and Q10

Re: Get available wireless access point and connect to it.

[ Edited ]

From the docs, it seems to me that your app can act as an aggregator app just by calling the wifi_aggregator_register() method referenced in my earlier post.

 

P.S. I haven't tried using this library myself yet, but it seems that it's now possible for apps to register and retrieve network information that were previously not available. Please try using the library and let us know if you encounter any problem.

@SamarAbdelsayed

Did this answer your question? Please accept post as solution.
Please refrain from posting new questions in solved threads.
Found a bug? Report it using the Issue Tracker
Please use plain text.