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

Java Development

Reply
Trusted Contributor
Posts: 174
Registered: ‎09-04-2011
My Device: Bold
My Carrier: at&t
Accepted Solution

Is there an event when mobile connections are changed

Hi, expert,

 

I am looking for some listener to check the following:

1. when the phone is connected a mobile network from not connected

2. when the phone is connected to a different mobile network (other carrier or wifi) from current network

3. the current mobile network connection is dropped.

 

I initailly found that ConnectionAttemptLIstener (http://www.blackberry.com/developers/docs/5.0.0api/net/rim/device/api/io/transport/ConnectionAttempt...). I thought that I could use this for mobile network connection change. It turns out that I could not. It listens to event on ConnectionFactory which is really a connect over the connected mobile network.

 

Did some search and I could not find any related info.

 

So is there a way for me to achive what I said initially?

Retired
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Is there an event when mobile connections are changed

You can use a combination CoverageStatusListener and RadioStatusListener to get access to these events. 

 

CoverageStatusListener will let you know what kind of network access you have access to based on your coverage (network connectivity via cellular, WLAN etc and which network transports are available). 

 

RadioStatusListener will let you know when changes to the cellular network occur such as signal changes, base station changes etc.

 

The RadioInfo class can also be used to receive information on the current mobile network too.

 

Regards,

Garett
@garettBeuk
--
Goodbye everybody!
Trusted Contributor
Posts: 174
Registered: ‎09-04-2011
My Device: Bold
My Carrier: at&t

Re: Is there an event when mobile connections are changed

Thanks a lot for the info.