Consult internet (3g or Wifi)

I use following code to check net connected via wifi or wap but also want to check if 3g. But do not know how...

 String checkNetwork(String url)
       {
           ServiceBook sb = ServiceBook.getSB();
           ServiceRecord[] records = sb.findRecordsByCid("WPTCP");
           String uid = null; 

           for(int i=0; i < records.length; i++)
           {
               //Search through all service records to find the
               //valid non-Wi-Fi and non-MMS
               //WAP 2.0 Gateway Service Record.
               if (records[i].isValid() && !records[i].isDisabled())
               {

                   if (records[i].getUid() != null && records[i].getUid().length() != 0)
                   {
                       if ((records[i].getUid().toLowerCase().indexOf("wifi") == -1) &&
                           (records[i].getUid().toLowerCase().indexOf("mms") == -1))
                       {
                               uid = records[i].getUid();
                               break;
                       }
                   }
               }
           }

           if (uid != null)
           {

               //open a WAP 2 connection
               url=url + ";ConnectionUID=" + uid;
           }
           else
           {

            //   url = url + ";interface=wifi";
               url = url + ";deviceside=true";
               //Consider another transport or alternative action.
           }
           return url;
       }

I want to check for 3g also pls help how?

You can check UMTS using the radiostatus.

Check if code sticky peters on the management of connections, no need to reinvent the wheel again

Tags: BlackBerry Developers

Similar Questions

  • Drops randomly in internet speeds on wifi devices

    Hello

    I got an Airport Extreme of 2nd generation (currently with firmware version 7.6.7) for many years before I upgraded to the newer model (6th generation - currently with the firmware 7.7.7) a few months ago. The old model, always worked, so I put up as a range extender. This facility has functioned well until recently I have began to experience drops in the download speeds of 5 to 30 Mbps on my iPhone and the Macbook Air, when should I achieve speeds of 90 Mbps. sometimes drops just connection completely as well. I can do speeds back to normal, if I have the device temporarily forget the network, and then I join it. I do not get these drops in connection on my Mac Mini, which is connected to the 6th generation Airport Extreme by ethernet. Is there anything I can do in the Airport utility to remedy this situation, or y at - it another utility application I should download to diagnose the problem (I found an app that could help called Wifi Explorer -https://itunes.apple.com/us/app/wifi-explorer/id494803304?mt=12) or is the most likely problem with the hardware?

    Thank you

    Matthew

    We need to know if the extreme old is configured as a roaming network... IE using extreme new ethernet or it is configured as a wireless extension.

    The original AE and the second... check the basis of EI... both are the A1143... is only single 2.4 ghz band or 5 GHz... they are NOT simultaneous dual-band.

    What installation speed can be extremely (sic) low... The old AE is really too old to be useful when combined with the newest one... you could just ask questions.

    If you need to extend wireless, then in Airport utility, hover your mouse over where it says unknown.

    This will give you the connection of the connection speed... I expect here very poor speeds and the actual file transfer speed will be a 1/3-1/4 of this link speed.

    Some details that I just put in another post.

    Re: TimeCapsule & GUI conflict internet connection not wifi. Why?

  • I want to install the ios 9.3 update in my iPad. I get the message: "audit failed because you are no longer connected to the Internet" actually, my wifi works and I'm online. Help, please.

    I wanted to install an update to iOS 9.3 on my iPad mini legacy. After that I entered the password for my motto. I receive the message: "check failed because you are no longer connected to the Internet. I then checked my wifi and works and I can go online. why I can't update? Help, please. Thank you

    This is a known error for which Apple seeks a solution. See Troubleshooting iOS 9.3 update problems.

  • Can not share the internet connection through Wifi

    Hi all

    I am connected to the internet using an external antenna connected via USB to my mac (WIRELESS n 801.11). I want to share this connection since my mac with other devices, i.e. my iPhone. I use the internet connection through system preferences--> sharing--> sharing internet--> connection on the part of wlan to computers via WIFI and give a name and a password for the wifi settings. When I start the connection icon wifi on the the high watch the arrow menu to the top, but it gives an IP address from 169 auto... etc etc and I can't any traffic to my iPhone.

    I tried to configure IPv4 to use DHCP with a manual (instead of automatic DHCP) address and IP I enter the IP address used in the WiFi, wifi says that it is connected to the name of the internet connection in the shared connection, I opened but once again no traffic to the iPhone. Also tried disabling the firewall, once again nothing.

    I run El Capitan 10.11.2.

    Clues?

    OS X El Capitan: share your Internet connection

  • Problem with internet connection through WIFI A536

    Hello.
    I bought a few days ago the A536 Lenovo.
    It works very well, it will connect to any wifi that I choose without problem, but after a while it stops internet access without obvious reason.
    He remains connected to WiFi, it keeps the same IP address, I have access to the router (ping works, and I can access the router configuration) in my browser but I don't have access to the internet from any application (browser, Skype, Viber, Mail, etc...)

    I tried a different WiFi (public) and has the same problem.
    (My laptop and a phone HTC Wildfire, Guard works well all the time at home)

    If I just simply disable and enable the WiFi antenna, it connects and it works again for 20-120 min

    I tried to restart, disable Firewall (and security), disable all applications that could affect internet access, add applications 'safe list' firewall, I even downloaded "Lenovo companion" but it is impossible to find problems.
    Wifi after awhile stops all communications to the internet.
    It is very annoying, because no internet means no messages, no emails and no calls VOIP programs.

    Anyone has the same problem?

    Is this A536 fault, or is this the Android 4.4.2?
    Is there a solution, or I have to restore my phone while I can and select a different template, such that it is unnecessary in the end I bought?

    Hi Draculas,

    1 check if there is no update firmware
    2. restoration of the factory

    If the problem persists then take to service center.

  • Cannot access the internet through a wifi router

    Hi, I recently bought a method 3 G USB wifi router. I connected physically on my desktop and internet wifi works very well. However I have problems to get access to the internet using my laptop Vista. The laptop is a connection for the wireless network connection, but that's what I get. Any ideas what is the problem?

    On my system, I connect them BOTH to the wireless network connection AND Internet (there are separate connections for each installation) on my laptop wireless.  If I don't connect to the Internet, I'm just locally connected to the wireless network.  If I am not connect to the wireless connection, I can't connect to the Internet.  I know not how your needs to be installed, but that is probably the problem.  You may add an internet connection for your laptop, and then connect both to achieve a good connection.

    I hope this helps.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • Impossible to share internet using my Wifi Intel utility

    Hi, I use Dell Inspiron N5110, OS, Windows 7 64 bit

    I am facing problem when you try to share my internet from my laptop using my Wifi Intel utility.

    The hotspot can be put in place and my camera is connected to my laptop with wifi. However, the problem comes when I try to turn on the share 'my internet' and he said: ' year error occurred while he was trying to turn on goes my Internet.
    I tried unistalling and reinstalling the card Miniport virtual Mircrosoft, but it did not work as well.

    Please advise and thank you.

    Thanks for the reply. However, I have not followed your method.

    I had successfully shared my internet by opening the "network and sharing Center" and in "the change map settings.

    I did a right click on the "Network Service" and select 'Properties', then in 'Sharing', check "Allow other users of the network to connect through this computer's Internet connection" and there is a column down to select 'Domestic network connection' and in my case the card/connection which is be my hotspot is "Wireless Network Connection 3" and then activate this I can share my internet through the hot spot.

    In any case, thanks for the reply.

  • Not able to connect to Internet using Pocket wifi band has.

    Original title: why windows 8 recognize im usually online using a wifi Pocket 2 connected by usb

    Why used windows 8 recognize im connected to the net using a Pocket wifi 2. plugged into usb

    Hey Damo,

    Please report the problem to Microsoft Community.

    According to the description, it looks like that you can not access Internet in Windows 8.

    However, we need some more information on this topic.

    Please help me to answer these questions.

    1. what happens when you try to access the Internet?

    2. What is the brand and model of Pocket wifi 2?

    I have this link which should guide you in the right direction.

    Visit the link and try the steps mentioned in it and check.

    Why can't I connect to the Internet?

    http://Windows.Microsoft.com/en-us/Windows-8/cant-connect-to-Internet

    Keep us updated on the status of the issue. For any help about Windows, you can still post on the Microsoft Community.

  • Having trouble with my internet connection through wifi. N600 router is what I think.

    I had some problems with my internet connection recently via my wireless router. I get the little triangle yellow and with the connection at different times and I can't call my local internet provider because it still works when they are open, and then it closes when they are closed. I recently bought a Google Chromecast and some think it might interfere with the connection, but I don't see how. When I reset the modem router and cable by unplugging and plug their return they sometimes get the rear connection but it's annoying not knowing when it will go off again, then come back. A few months before the connection out sometimes but not several times a day. If you need additional information such as the type IP DNS stuff I can get it. Also recently I have updated the firmware of the Netgear if that makes a difference. Thank you!

    Thanks to all who responded. I talked to my ISP and discovered that the modem was abandon the connection because he was old and he sold me a new and things work fine now. Thanks again!

  • Unable to connect to the Internet via portable wifi hotspot

    I have windows 7 on my laptop and unite-5459 wifi cell phone through at & t.  When I click on to connect and after that I entered the password I get the message "windows could not connect to this network. I ran to the resolution of problems and it can not find the problem. Sure he's with adapter configuration butdont know how to fix. Need quick help, I do cyber Christmas shopping

    Hi Lynn,

    Thanks for posting your question on the Microsoft community.

    I would like to know some information about the problem so that we can help you better.

    What is the brand and model of your laptop?

    Thank you for details on the question and your efforts to resolve.

    This problem can occur for the following reasons:

    -If the adapter wireless network switch is not activated.
    -WEP, WPA or WPA2 key or password security issues.
    -Corrupt or incompatible drivers.
    -Missing updates.
    -Incorrect network connection settings.

    I would suggest trying the following methods and check if it helps.

    Method 1:
    Please use the suggestions provided in this article and the Coachman.
    Reference:
    Why can't connect me to a network?
    http://Windows.Microsoft.com/en-us/Windows/cant-connect-to-network#1TC=Windows-7

    If this does not help, use method 2.

    Method 2:
    Suggestions of use contained in this Microsoft Help article and check the issue.
    Reference:
    Wireless and wired network problems
    http://Windows.Microsoft.com/en-us/Windows/network-connection-problem-help#network-problems=Windows-7&V1H=win81tab1&V2H=win7tab1&V3H=winvistatab1&v4h=winxptab1

    I hope this information helps.

    Please let us know if you need more help.

    Thank you

  • No puedo conectarme internet utilizando el wifi

    Como puedo reparar mi coneccion an internet mediante el fiwi

    Microsoft proporciona soporte sitio en frances responses. A Uniform Resource Locator (URL) here is entirely of Quebec reciba soporte para para information known location. Abre el issues y su select region in the list desplegable y haga click in el boton para continue flecha.

    http://answers.Microsoft.com/es-ES

  • internet connection with wifi Repeater

    Hello

    I can't connect my computer with a netgear wn3000rp wireless Repeater
    problem with the wireless card network or point of access
    Thank you in advance

    Hello

    You created this thread in the English version of the Microsoft Community. Please could you click on the globe icon to the world at the bottom left of the screen and then choose your preferred language. Now create your thread again.

    If you can't find a suitable language, please go here:

    http://support.Microsoft.com/common/international.aspx

    for other international support options.

    Thank you.

  • Even though I have my iPad WiFi connects to the internet even after that I have reset the network settings

    Having never had a problem with my iPad since buying about 3 years ago, suddenly I can't access the internet use it & none of the applications that need the internet have access either. (since the last update for IOS 9.3) I have reset the settings of the internet and the WiFi signal at the top is visible. Airport app told me that I have access to the internet, but I did not!  Does anyone else have this problem? I would really appreciate a quick solution, because it's so annoying when things sync and I need them to-such as the events of diary, photos email etc. not to mention the SMS!  Any help gratefully received!

    General suggestions for Wi - Fi problems, maybe one of them will help you...

    (1) perform a forced reboot: hold the Home and Sleep/Wake buttons simultaneously for about 15-20 seconds, until the Apple logo appears. Leave the device to reboot.

    (2) resetting the network settings: settings > general > reset > reset network settings. Join the network again.

    (3) reboot router/Modem: unplug power for 2 minutes and reconnect. Update the Firmware on the router (support Web site of the manufacturer for a new FW check). Also try different bands (2.4 GHz and 5 GHz) and different bandwidths (recommended for 2.4 to 20 MHz bandwidth).

    (4) change of Google DNS: settings > Wi - Fi > click the network, delete all the numbers under DNS and enter 8.8.8.8 or otherwise 8.8.4.4

    (5) disable the prioritization of device on the router if this feature is available.

    (6) determine if other wireless network devices work well (other iOS devices, Mac, PC).

    (7) try the device on another network, i.e., neighbors, the public coffee house, etc.

    (8) to restore the device (ask for more details if you wish).

    https://support.Apple.com/en-us/HT201252

    (9) go to the Apple Store for the evaluation of the material.

  • iMac loses the internet connection when I turn off wifi

    Any help appreciated! I'm not very computer savy! Can my grandson tell me (how) on some things.

    I lose the internet connection when wifi is disabled. It will happen when using any browser, Firefox-Safari-Google Chrome.

    Desktop computer is connected to the modem.

    Model name: iMac

    Processor name: Intel Core i7

    Processor speed: 3.4 GHz

    Number of processors: 1

    Total number of Cores: 4

    (By heart) L2 Cache: 256 KB

    L3 Cache: 8 MB

    Memory: 4 GB

    Any ideas? Thank you

    You can use an ethernet cable between the modem (= the internet connector) and the iMac.

    WiFi is like an invisible computer thread worms (among others) the modem. When you switch WiFi off, your computer cannot reach the modem and so there is no internet on your computer.

  • Internet goes when you are connected to wifi

    Bought an iMac on eBay this week, works fine apart from a problem I encounter with internet stall, which really starts to get boring!

    It's an iMac, mid-2011, with OS X el Capitan 10.11.3 installed and put to update to the most recent update.

    The question...

    When you are connected to our home network (Sky Broadband) I get internet access for 5 minutes for an hour then stop him internet but the wifi is connected. At this point if I check all other computers/phones/tablets on the network that they are all still connected to the internet with absolutely no problem.

    The temporary solution...

    If I disable the wifi on my iMac and then back on again once it reconnects immediately and internet works fine still a time - until it stops!

    What I tried...

    Restart the mac repeatedly

    Restarted the router again

    In network settings, advanced on the mac, I renewed the DHCP lease (loads of times - note it always seems to come back with exactly the same ip address - I guess it's good?), updated the DNS (last post I read said to use 2.4.4.2 so am currently on that), tried to manually set the MTU to 1453, I deleted all the other networks stored outside my home network Too much.

    Does anyone have any suggestions please for all messages that have worked for them, or things that I could try?

    Thanks a lot for your help

    Joe

    Did you erase the internal drive and install OS X yourself? Did you run the hardware test? If this isn't the case, please do both.

Maybe you are looking for

  • Rolling constant beachball more

    For awhile there, it has become impossible for people who are using earlier versions of the Mac operating system to use Skype, so a person in a community came with a fancy workaround that involves changing something in the Terminal. While Skype came

  • SanDisk ultra II 480 GB ssd update for macbook pro 2009 (5.4)

    Hi, this is not a question but just some information that I wanted to let down as I was cultural for this search but could not find any info anywhere here or elsewhere online... My 6 year old, 250GB internal hard drive died and I decided to replace i

  • XY graphics table

    I have a loop for. Inside the loop for, there's a XY Chart, including indicator I in the façade. I would like to have the graph not inside the loop, but outside, with indexing enabled. Now I want an array of graphs, in order to have available ALL the

  • With the help of sleep - ThinkPad T420

    I was told that using sleep instead of turn off my ThinkPad T420 will destroy him. Is this true? I find practice never to shut down the computer, but I don't want to cause any damage.

  • How can I add child account?

    Trying to set up a new machine of Windows 8 and add two children.  I have a windows live Id, but cannot find anywhere to create an Id of windows for kids. I tried clicking on the various links in messages windows8 machine and my vista machine which f