BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 11-07-2011, 12:32 AM   #1 (permalink)
New Member
 
Join Date: Apr 2009
Model: 8700
PIN: N/A
Carrier: rogers
Posts: 2
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default RadioStatusListener not working

Please Login to Remove!

I implement a RadioStatusListener.
I have tried both the Network Diagnostic tool and my own.
I have registered with the addradiolistener from UIApplication, but have not been able to get a detection event from either roaming or SNR.

Is there any magic here?
It seems like it just does not work. This should be simple.
Offline  
Old 11-07-2011, 07:23 AM   #2 (permalink)
BlackBerry Extraordinaire
 
Join Date: Jan 2006
Model: LEZ10
OS: 10.0.10
Carrier: Rogers CA
Posts: 1,704
Post Thanks: 20
Thanked 77 Times in 68 Posts
Default Re: RadioStatusListener not working

No magic, though I haven't tried to detect roaming. The signal level callback is quite chatty. Perhaps if you shared some code?
__________________
My other Blackberry is a PlayBook.
Offline  
Old 11-07-2011, 05:07 PM   #3 (permalink)
New Member
 
Join Date: Apr 2009
Model: 8700
PIN: N/A
Carrier: rogers
Posts: 2
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: RadioStatusListener not working

Not much code to add, but here is the gist:

public class UDPClient extends Thread implements RadioStatusListener

public UDPClient()
{
super();
UiApplication.getApplication().addRadioListener(th is);
}

........implemented all interface methods.


Add breakpoints and nothing when going to the connections on the phone and turning off
the 3G on the actual phone and on the simulator.I even compiled the Network Diagnostic Tool and it does not work. And yes I started the thread and have a reference to the thread object in my main class so it doesnt get garbage collected and is running idefinately as I am doing other things in this class.

Last edited by sdupuis1_ca@yahoo.ca : 11-07-2011 at 05:10 PM. Reason: add more
Offline  
Old 11-08-2011, 01:25 PM   #4 (permalink)
BlackBerry Extraordinaire
 
Join Date: Jan 2006
Model: LEZ10
OS: 10.0.10
Carrier: Rogers CA
Posts: 1,704
Post Thanks: 20
Thanked 77 Times in 68 Posts
Default Re: RadioStatusListener not working

Run this on the simulator, play with the Simulate -> Network Properties RSSI, turn the radio on and off. Works for me...


Code:
package rsl;

import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.ui.container.MainScreen;
import net.rim.device.api.ui.component.AutoTextEditField;
import net.rim.device.api.system.RadioStatusListener;


/**
 * 
 */
class MyRadioStatusListener extends UiApplication implements RadioStatusListener {
    private MainScreen mainScreen;
    private AutoTextEditField   text;
    
    public static void main(String[] args) {
        MyRadioStatusListener rsl = new MyRadioStatusListener();
        rsl.pushScreen(rsl.mainScreen);
        rsl.enterEventDispatcher();
    }
    
    MyRadioStatusListener()  { 
        mainScreen = new MainScreen();
        mainScreen.setTitle("RadioStatusListener");
        text = new AutoTextEditField();
        text.setText("Output:\n");
        mainScreen.add(text);
        addRadioListener(this);
    }
    
    public void baseStationChange() {
    }
    
    public void networkScanComplete(boolean status) {
        text.setText(text.getText() + "networkScanComplete " + status + "\n");
    }
    
    public void networkServiceChange(int networkId, int service) {
    }
    
    public void networkStarted(int networkId, int service) {
    }
    
    public void networkStateChange(int state) {
    }
    
    public void pdpStateChange(int apn, int state, int cause) {
    }
    
    public void radioTurnedOff() {
        text.setText(text.getText() + "radioOff\n");
    }
    
    public void signalLevel(int level) {
        text.setText(text.getText() + "signalLevel " + Integer.toString(level) + "\n");
    }
}
__________________
My other Blackberry is a PlayBook.
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

Similar Threads for: RadioStatusListener not working
Thread Thread Starter Forum Replies Last Post
9810 -- Trackpad stopped working?!?! JoeJack101 General 9800 Series Discussion - Torch 5 11-24-2011 08:22 AM
BB Media Sync stops working when I try to launch it from BB Desktop Manager itsphake General 9700 Series Discussion - Bold 2 0 05-16-2010 05:38 PM
Enterprise Activations have stopped working matthewtrotter BES Admin Corner 0 03-16-2010 10:05 AM
Emails sent to self not working jcricket General Legacy Device Discussion 3 04-13-2007 12:54 PM
Redirector - Not working, help? wangta01 General Legacy Device Discussion 3 02-23-2007 04:24 PM





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