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

HITACHI M-8000 Mass Spectrometer LCMS HPLC w/ Vacuum Pump #7242
$500.0
HITACHI M-8000 Mass Spectrometer LCMS HPLC w/ Vacuum Pump #7242 pictureNEW HP 36A Toner Cartridge Genuine OEM Open Box but Vacuum Sealed CB436A
$15.0
NEW HP 36A Toner Cartridge Genuine OEM Open Box but Vacuum Sealed CB436A pictureStokes 149 Vacuum Pump
$100.0
Stokes 149 Vacuum Pump pictureContemporary Products Aspirator Vacuum Pump Model 6260
$79.99
Contemporary Products Aspirator Vacuum Pump Model 6260 pictureMz Ventilatori Aspiratori Vacuum/Blower With 0.5HP 3360Giri 254/440Volts Motor
$89.99
Mz Ventilatori Aspiratori Vacuum/Blower With 0.5HP 3360Giri 254/440Volts Motor picture






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