Thursday, September 19, 2013

BB10 How to know the network status

Recently I came across a scenario where we need to retrieve the network status in the BB10 Application. As we are implemented the App using Qt frame work 4.8, this Qt framework does not have any API/method to get the network status. Here I got one API which is provided by Blackberry team for the BB10.0.

netstatus_get_availability is the method to get the network status in the BB10 OS. And Below is the syntax for that method. This method works only in BB10.0. Its depreacated for later versions and introduced new method netstatus_get_info().
Syntax:
BPS_API int netstatus_get_availability(bool *is_available)

In the document they specified, need to add libbps library,  but without including libbps also application working fine.For updated API' and for more information for retrieving network status for the BB10.

http://developer.blackberry.com/native/reference/core/com.qnx.doc.bps.lib_ref/com.qnx.doc.bps.lib_ref/topic/netstatus_get_availability.html


No comments:

Popular Posts