BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 07-03-2009, 07:22 AM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: Jan 2009
Model: 7100T
PIN: N/A
Carrier: -
Posts: 73
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default problem with RadioStatusListener

Please Login to Remove!

hi,
i need to implement a class that will register if user connects to the internet, for how long, if he receives any data etc. i've started with implementing a class that would implements RadioStatusListner but it simply does not work.
here is the code:
Code:
InternetInfo _internetInfo = new InternetInfo();
UiApplication.addRadioStatusListener( _internetInfo);

public class InternetInfo implements RadioStatusListener{

  Nouvelle _nouvelle;

	public InternetInfo(){
	  _nouvell = new Nouvelle();
	};
	
	public void baseStationChange(){
		_nouvelle.attention("1");

	}
	
	public void networkScanComplete(boolean _success){
		_nouvelle.attention("2");

	}
	
	public void networkServiceChange(int _networkID, int _service){
		_nouvelle.attention("3");

	}
	
	public void networkStarted(int _networkID, int _service){
		_nouvelle.attention("4");

	}
	
	public void networkStateChange(int _state){
		_nouvelle.attention("5");

		
	}//end of networkStateChange
	
	public void pdpStateChange(int _apn, int _state, int _cause){
		_nouvelle.attention("6");

	}
	
	public void radioTurnedOff(){
		_nouvelle.attention("7");

	}
	
	public void signalLevel(int _level){
		_nouvelle.attention("8");

	}
	
	
}


where Nouvelle.attention:

	public void attention(String data)
	{
	_ui = Ui.getUiEngine();
	_screen = new Dialog(Dialog.OK, data, Dialog.OK,
		Bitmap.getPredefinedBitmap(Bitmap.EXCLAMATION),
				Manager.VERTICAL_SCROLL);
		
		_ui.queueStatus(_screen, 1, true);
		
	}
but nothing happens. i mean-i use the browser, went to some page, turned off/on network and nothing! none of these alerts appears..

Can anyone help me with that?

kind regards
Offline  
Old 07-03-2009, 08:39 AM   #2 (permalink)
Thumbs Must Hurt
 
Join Date: Jan 2009
Model: 7100T
PIN: N/A
Carrier: -
Posts: 73
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

looks like i had a bug, not related to this code. it works fine!

kind regards
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

IBM SELECTRIC TYPEWRITER PART (NEW IBM BRAND) MOTOR DRIVE BELT OEM #1124812
$16.49
IBM SELECTRIC TYPEWRITER PART (NEW IBM BRAND) MOTOR DRIVE BELT OEM #1124812 pictureNEW IBM SELECTRIC III TYPEWRITER PART, WHITE LEFT MARGIN POINTER OEM NOS
$9.99
NEW IBM SELECTRIC III TYPEWRITER PART, WHITE LEFT MARGIN POINTER OEM NOS  pictureOEM NEW IBM Selectric Dust Cover with IBM Logo Full Size 1204635
$29.99
OEM  NEW IBM Selectric Dust Cover with IBM Logo Full Size 1204635 pictureOEM IBM Personal Wheelwriter 2 Part: Transport Belt & Gear
$13.98
OEM IBM Personal Wheelwriter 2 Part: Transport Belt & Gear pictureOEM IBM Personal Wheelwriter 2 Part: Spring Lot
$9.99
OEM IBM Personal Wheelwriter 2 Part: Spring Lot picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.