How to check the device is roaming or not?

Hello

I want to do small application which the dialog box would display if the user is roaming or home network with the click of the button.

I've read all this link below

link 1

link 2

link 3

link 4

I don't this small application, but still it is good code to determine whether or not the user is roaming.

My code is here

public final class MyScreen extends MainScreen
{
    /**
     * Creates a new MyScreen object
     */
    ButtonField btnOk;
    public MyScreen()
    {
        // Set the displayed title of the screen
        setTitle("MyTitle");
        btnOk=new ButtonField("OK");
        btnOk.setChangeListener(new FieldChangeListener() {

            public void fieldChanged(Field field, int context) {
                // TODO Auto-generated method stub

                if(isOnRoaming())
                {
                    Dialog.alert("User is in Roaming ");
                }
                else
                {
                    Dialog.alert("User is not in Roaming");
                }
            }
        });
        add(btnOk);

    }
    public boolean isOnRoaming()
    {
        boolean returnable = false;
    if (((RadioInfo.getNetworkService() & RadioInfo.NETWORK_SERVICE_ROAMING) != 0)
        || ((RadioInfo.getNetworkService() & RadioInfo.NETWORK_SERVICE_ROAMING_OFF_CAMPUS)!= 0))
        {
            returnable = true;
        }
        return returnable;
    }

} 

I think it's the link that says my code is correct...
http://supportforums.BlackBerry.com/T5/Java-development/determine-the-current-network-name/Ta-p/4448...

Tags: BlackBerry Developers

Similar Questions

  • How to find the device is roaming

    Hello

    I need to test if the coverage is roaming.

    I went through the thread:

    http://supportforums.BlackBerry.com/Rim/Board/message?board.ID=java_dev&message.ID=41137&query.ID=82...

    Who says

    boolean isRoaming = (0 != (RadioInfo.getState() & RadioInfo.NETWORK_SERVICE_ROAMING));
    

    I tested it on the device and emulator and both give me the value.

    The RadioInfo.getState are '1' and RadioInfo.NETWORK_SERVICE_ROAMING gives '8 '.

    and that's the reason why he fake retruning.

    When I check the connection management option, it says that its on Roaming.

    I have Blackberry Pearl 8130 version 4.5.0.66 (CDMA)

    You must use getNetworkService() instead of getState().

        public boolean isOnRoaming() {
            boolean returnable = false;
            if (((RadioInfo.getNetworkService() & RadioInfo.NETWORK_SERVICE_ROAMING) != 0)
                    || ((RadioInfo.getNetworkService() & RadioInfo.NETWORK_SERVICE_ROAMING_OFF_CAMPUS) != 0)) {
                returnable = true;
            }
    
            return returnable;
        }
    
  • CS4: [JS]: how to check the frame is threaded or not?-Reg.

    Dear all

    I have a doubt with regard to executives of threads.

    For example, I used 10 threaded pages and 2 pages are not threaded at the time of the treatment...

    So how to check all the frames are threaded or not?.

    Please can someone give me a piece of the idea, then I would appreciate...

    Thanks and greetings

    Thierry T.R.Harihara

    textFrame.nextTextFrame and textFrame.previousTextFrame tells you how

    a block of text is threaded...

    Substances

  • How to check the device current outgoing phone is phone PBX?

    As the title.

    We can get the phone number of device using RIM Phone.getDevicePhoneNumber (true);

    But how do we know that it is the PBX phone or not?

    or how put the PBX phone as dial telephone number of default programmatically?

    Thank you.

    I assume you mean how to determine if the line is a phone line or PBX line activated by the voice of BlackBerry Mobile.  Currently, there is no API to determine or change the setting of default line on a BlackBerry handheld.

  • How to test the weather device is roaming or not?

    Hi, we have a requriement that we check the weather, that the device is roaming or don't use not rim api.

    so any body can help me please in this area, which has the code to know weather device is roaming or not using not rim api?

    You should check the bitmask returned by RadioInfo.getState (). For example, in this way:

    boolean isRoaming = (0 != (RadioInfo.getState() & RadioInfo.NETWORK_SERVICE_ROAMING));
    

    In addition, pay attenation that are NETWORK_SERVICE_ROAMING and NETWORK_SERVICE_ROAMING_OFF_CAMPUS. I don't know what is the difference and if one of them is what you need. All that I know is the way how to check the binary indicator.

  • How to check the space on the asm and raw device?

    Hi all

    I want to know how to check the space on the device of the DSO.
    We use a feature of the asm, which is on a raw partition.
    Our archive is full. I need to check the space on asm archve partiotion.
    How can I check the destination space archive?
    We are using partition raw device for crs and voting system.
    How can we check the space on the raw device and how do know us which device is currently in use and are not in service

    Thanks in advance

    4 - 5 raw partitions...
    What version of oracle?
    Install the OCR + VOTE in gross unit better than OCFS2. If you use 10g to 11 GR 1 material.

    If use 11 GR 2, take the OCR + VOTE in ASM disk group.

    You can check what raw OCR device:
    $ ocrcheck

    VOTEDISK:
    $ crsctl query css votedisk

    On 10g if using the raw device for OCR + votedisk: recommend 1 file = 250M
    11g recommend 1 file = 512M

    Good luck

  • Satellite A200 - how to check the temperature of the processor fan?

    Hi all

    I have a Satellite A200 that my teenagers use a little, or abuse a little! Recently, it would not start up. I suspect the fan and pulled out the fan cleaned and tested the fan on a PSU, worked out well. He put it back together, ran startup repair and now the computer is operating normally. The fan is however not appear to come at all. In the Device Manager it tells me it works very well. I'm all good with the mechanical side of the House, but I'm a quamby operating system! How to check the temp CPU or fan?

    Thought that replace the fan but don't want to go that far just to get no results. Currently using the vacuum on low like an external fan and didn't want to just run the laptop with no cooling for fear of permanent damage. Although children watch movies with her on their doona may have already reached this!

    Any advice would be appreciated.

    Hey mate,

    How to clean the fan exactly? It s advisable to use the jet of compressed air. This could blow the dust of fans cooling and, therefore, it of not necessary to disassemble the laptop.

    In addition if the fan doesn't work anymore it of necessary to replace. You can order spare parts at an authorized service provider.

  • Network troubleshooting is he diagnosed "your computer is correctly configured, but the device dns server is not responding...". How can I fix it

    I get a lot offline on my laptop. After that I ran the network troubleshooting is diagnosed "your computer is set up correctly, but the device dns server does not respond.  How can I fix this problem please?

    Hello

    1. what operating system is installed on your computer?

    2. are you using wired or Wi - Fi?

    3. you will remember to do recent changes on the computer before this problem?

    I suggest you

    Method 1:

    Empty the Cache DNS (Domain Name System) follow the steps below:

    a. click the Start button.

    (b) in the search box, type command prompt.

    c. in the list of results, right-click command prompt, and then click Run as administrator.  If you are prompted for an administrator password or a confirmation, type the password or provide confirmation.

    d. at the command prompt, type ipconfig/flushdns.

    Method 2:

    If the previous step fails, follow these steps and check if the problem persists:

    a. click "Start", enter "NCPA. CPL"(without the quotes) and press ENTER.

    b. right-click on the connection you use for the local connection, and then click "Properties".

    c. Click to select 'Protocol Internet Version 4 (TCP/IPv4)' and then click 'properties '.

    d. in the Internet Protocol window, we will change the "Preferred DNS server" to 208.67.222.222

    e. click 'OK' twice to complete the change.

    f. If the problem persists, please repeat the steps and change the "Preferred DNS server" to 208.67.220.220.

    Method 3:

    If the previous step fails, follow the steps described in the following link:

    http://support.Microsoft.com/kb/928152

    For more information, check the following links:

    http://Windows.Microsoft.com/en-us/Windows/help/wired-and-wireless-network-connection-problems-in-Windows

    http://Windows.Microsoft.com/en-us/Windows/help/wired-and-wireless-network-connection-problems-in-Windows

  • How to check the firmware version?

    Hello

    How to check the version of firmware on my device?

    Help, please!

    Thank you

    Hello mohsen122002,

    Hope that this page will help you.

    -Bryan-

  • How to use the device as a simulator.

    Hi all

    Can someone tell me how to use the device (with my development pc) as Simulator.

    Whenever I need to check the appilcation in device of signed files .cod that is compiled in the Simulator.

    Because I got the outofmemory error in the device rather than simulator.

       

    Thus, any solution which signed without how can I check my direct request to the device itself. Any setting in preferences or etc...

    Thank you

    Tejas

            

    The only way you should not sign the cod is if no controlled classes/interfaces are used. The easy way to find out is to open the SignatureTool and see if your application requires signature. Otherwise this says icefrost1 's good enough solution.

  • Anyone know how to check the date of warranty until when?

    Anyone know how to check the date of warranty until when?

    https://checkcoverage.Apple.com/Jo/en/;JSESSIONID=9pJ0X9pFPJtNg3c44yDGCvk9pVpt5l QSgn4B60y4Skv1WfmnqMkF!-1840326800

  • How to check the balance on the gift card itunes

    How to check the balance on the gift card itunes

    Redeem it

  • How to check the print queue in Windows 8

    Difficulty controlling the queue with your new Windows 8? Here's a great video on how to do it:

    Hope this helps to understand how to check the print queue in Windows 8. If you have problems, let me know, I'll see what I can do to help.

  • HP Photosmart 7525: How to check the version of the firmware of the HP PhotoSmart 7525 is up-to-date?

    How to check the version of the firmware of the HP Photosmart 7525 is up-to-date? And where can I go to download the latest firmware?

    Hello

    Follow these steps to check the update of firmware for your printer:

    http://support.HP.com/us-en/product/HP-Photosmart-7520-e-all-in-one-printer-series/5199461/model/5286642/document/c03312867/

    Note: the printer must be connected to your network to check the updates, if it is connected with a USB key follow the steps in the tehse to connect the * beep * to your wireless network:

    1. In the wireless menu, tap Settings.

  • How to check the size of the file to a text file.

    How to check the size of the file to a text file.

    Please explain to me.

    I'm new in LabVIEW. and have no idea about that...;

    Hi prashant,

    go to the file e/s palette and then the advanced palette which is a search palletteand sub getfilesize.vi... but this function gives the result in bytes...

    Thank you and best regards,

    srikrishnaNF

Maybe you are looking for

  • Upgrade CPU on a Satellite M40: Celeron to Pentium M (?)

    Hello world I have a simple question. Don't you think that we can change the processor in a M40 - 307 (the one with the ATI chipset) Celeron m for a Pentium M? I currently have a Dothan Celeron M370 (400 mhz fsb), so I guess that a dothan Pentium M (

  • MS Visuall C++ Version 6 license.

    I want to buy Microsoft Visual C++ Version 6.  It IS NOT offered by microsoft more.  I can find it on ebay.  I would use it at work. The problem is that I need to be able to legally use at work or I lose my job.   Is there a way to ensure that I have

  • Zoo Tycoon 2 Ultimate Collection Installation in windows XP laptop Apple

    I try to install the game in my laptop (windows XP) Apple, but when I put the second CD during installation, it just freezes and installation does not illuminate. -Does anyone know what is the problem?

  • Cisco and Checkpoint - no selected proposal

    Hello We had a working IPSEC VPN between router IOS and Checkpoint FW group. Now, after you add host entries in the ACL, we did get "no selected proposal. My question: => Can we use more than an entry in an ACL, attached to a card encryption? Like th

  • How to read an ADF ApplicationModule Cookie values?

    HelloHow to read an ADF ApplicationModule Cookie values?My ADF Application uses custom Cookies, I created these cookies following this post: https://community.Oracle.com/thread/3823211I need to read the Cookie of the ADF ApplicationModule values.Coul