BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 11-07-2011, 12:32 AM   #1
sdupuis1_ca@yahoo.ca
New Member
 
Join Date: Apr 2009
Model: 8700
PIN: N/A
Carrier: rogers
Posts: 2
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
hrbuckley
BlackBerry Extraordinaire
 
Join Date: Jan 2006
Model: LEZ10
OS: 10.0.10
Carrier: Rogers CA
Posts: 1,704
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
sdupuis1_ca@yahoo.ca
New Member
 
Join Date: Apr 2009
Model: 8700
PIN: N/A
Carrier: rogers
Posts: 2
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
hrbuckley
BlackBerry Extraordinaire
 
Join Date: Jan 2006
Model: LEZ10
OS: 10.0.10
Carrier: Rogers CA
Posts: 1,704
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



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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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 04:38 PM
Enterprise Activations have stopped working matthewtrotter BES Admin Corner 0 03-16-2010 09:05 AM
Emails sent to self not working jcricket General Legacy Device Discussion 3 04-13-2007 11:54 AM
Redirector - Not working, help? wangta01 General Legacy Device Discussion 3 02-23-2007 04:24 PM


MSA ALTAIR 4XR picture

MSA ALTAIR 4XR

$700.00



MSA altair 4X multi gas meter Monitor detector, O2,H2S,CO,LEL Charger calibrated picture

MSA altair 4X multi gas meter Monitor detector, O2,H2S,CO,LEL Charger calibrated

$340.00



MSA Altair 5 Gas Detector  picture

MSA Altair 5 Gas Detector

$98.99



MSA Altair 5X Gas Detector Meter *Recently Calibrated and 30 Day Warranty* picture

MSA Altair 5X Gas Detector Meter *Recently Calibrated and 30 Day Warranty*

$795.00



MSA 10042621 Altair 5X Sampling Probe Straight Air-Line 1' Color Black (E2) picture

MSA 10042621 Altair 5X Sampling Probe Straight Air-Line 1' Color Black (E2)

$295.00



New MSA Altair Pro O2 Gas Detector (Part Number 10074137c) - Open Box picture

New MSA Altair Pro O2 Gas Detector (Part Number 10074137c) - Open Box

$269.99







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