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
Highlighted
Developer
Posts: 206
Registered: ‎02-22-2011
My Device: BB TORCH & 9800
My Carrier: idea

Network Availability to user

Hi All,

 

I want to show the message(some alert) to user regarding NetworkAvailability.

 

Like Device is in online or not(Offline)..?.

 

I have implemented RadioStatusListener and required methods overriden and while Im doing network on/off,

mostly signalLevel() method is calling repeatedly.

 

In signalLevel() method Im using Dialog.alert("my network message") to show the message to user.

 

Now while im turing on Mobile network the signalLevel() is calling repeatedly until its fetching the full network signal.  Due to that I'm getting mutiple alerts. So how to restrict this. I want to show the alert to user only once either in online/offline based on turn on/off.

 

 

Thanks in Advance

Anil

*****************************************************************************
* Give kudos when you like it
* Mark it as a solution if it fixes your issue
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Network Availability to user

Having signalLevel called repeatedly is exactly what I would expect to happen.  You have seen the 'bars' on your phone increase and decrease depending on how close you are to a mast.  This is not directly related to whether the device can communicate or not (except at 0 when clearly it can not or course!).  So I don't think you can use this, at least not by itself, to inform your user. 

 

But what exactly are you telling the user is 'on' or 'off'.  Access to the network for phone calls?  Access to the network to send a text.  Or access to the Network to send data?. 

Developer
Posts: 206
Registered: ‎02-22-2011
My Device: BB TORCH & 9800
My Carrier: idea

Re: Network Availability to user

Hi Peter

Thanks for reply, I need to tell the user whether network is on/off..via alert.


*****************************************************************************
* Give kudos when you like it
* Mark it as a solution if it fixes your issue
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Network Availability to user

If you look at your BB, you will see various network status icons displayed, like GSM, GPRS, EDGE.  The network is connected if you see one of these.  But if it is GSM (or whatever is displayed in a CDMA phone), then you only have voice.  So connected does not mean you can send data.   

 

So what state does your network need to be in to be considered off?  What must it be capable of doing?

Developer
Posts: 206
Registered: ‎02-22-2011
My Device: BB TORCH & 9800
My Carrier: idea

Re: Network Availability to user

Hi peter,

Just I want to show the user about network availability (Device is online/Offline) that's it.

If mobile network / wifi or any one present it should show "Device is online"

If none of the network presents It should show "Device is offline".

For now I need to do this much.

When I done with signal level it leads to multiple alerts but alert should come only once.


Regards
Anil
*****************************************************************************
* Give kudos when you like it
* Mark it as a solution if it fixes your issue
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Network Availability to user

[ Edited ]

"When I done with signal level it leads to multiple alerts but alert should come only once."

 Worse that that - it is only checking Radio - which could be off and you could still have connectivity using WiFi.

 

Sorry I seem to be repeating the same thing here.  You still have not defined what you mean when you say the Device is Online. 

 

I think what you are saying is that the phone is online, when your application can communicate with the Server.  But I want your words.  Can you define what actions can the user take when the device is online that they can't perform when it is offline? 

 

As noted, it probably has nothing to do with the signal level, so you should ignore that as a possible way to determine the device status.