BlackBerryForums.com : Your Number One BlackBerry Community
     

»Sponsored Links


BlackBerryApps.com Best Sellers



Reply
 
LinkBack Thread Tools
  (#1 (permalink)) Old
misty83 Offline
Thumbs Must Hurt
 
Posts: 73
Join Date: Jan 2009
Model: 7100T
PIN: N/A
Carrier: -
Default problem with RadioStatusListener - 07-03-2009, 08:22 AM

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
   
Reply With Quote
Sponsored Links
Please Login or Register to Remove these Advertisements!

  (#2 (permalink)) Old
misty83 Offline
Thumbs Must Hurt
 
Posts: 73
Join Date: Jan 2009
Model: 7100T
PIN: N/A
Carrier: -
Default 07-03-2009, 09:39 AM

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

kind regards
   
Reply With Quote
Reply


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





Copyright © 2004-2009 BlackBerryFAQ.com, BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of Research In Motion Limited.