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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
Trusted Contributor
pli
Posts: 174
Registered: ‎09-04-2011
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?

Please use plain text.
BlackBerry Development Advisor
gbeukeboom
Posts: 1,837
Registered: ‎10-16-2009
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 Beukeboom
BlackBerry Development Advisor
Developer Zone
@garettbeukeboom

--
Think of a great new feature? Find a bug?
Log and track them using the Developer Issue Tracker
Please use plain text.
Trusted Contributor
pli
Posts: 174
Registered: ‎09-04-2011
My Carrier: at&t

Re: Is there an event when mobile connections are changed

Thanks a lot for the info.

Please use plain text.