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


DB3 DIODE DIAC Bilateral Bidirectional Thyristor | You Pick Qty | US Ship picture

DB3 DIODE DIAC Bilateral Bidirectional Thyristor | You Pick Qty | US Ship

$9.55



TELCON / VISHAY HTP 50/2K & IR P105W Power Module & THYRISTOR DIODE MODULE picture

TELCON / VISHAY HTP 50/2K & IR P105W Power Module & THYRISTOR DIODE MODULE

$214.06



Replacement   TA20181803DH   NEW   Powerex  Thyristor SCR picture

Replacement TA20181803DH NEW Powerex Thyristor SCR

$79.00



NTE 5596 0304 Thyristor picture

NTE 5596 0304 Thyristor

$120.00



Semikron SKKT253/14E, SemiPack 3 Thyristor/Diode Module picture

Semikron SKKT253/14E, SemiPack 3 Thyristor/Diode Module

$65.00



AVC Specialists RASTD074 Thyristor switch picture

AVC Specialists RASTD074 Thyristor switch

$199.95







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