BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 12-15-2010, 09:46 PM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Oct 2010
Model: 8100
PIN: N/A
Carrier: Software
Posts: 17
Post Thanks: 1
Thanked 0 Times in 0 Posts
Post OpenCellID doesnt work

Please Login to Remove!

Hi, Im trying to do an application for getting location using OpenCellID. I'm using this code in order to get some parameters needed by OpenCellID:

Code:
public class Geopd extends net.rim.device.api.ui.UiApplication 
{
	private boolean isNetworkType(final int type)
    {
        return (RadioInfo.getNetworkType() & type) == type;
    }

	private String networktypes()
    {
        if(isNetworkType(RadioInfo.NETWORK_UMTS))
            return "3G";
        if(isNetworkType(RadioInfo.NETWORK_CDMA))
            return "CDMA";
        if(isNetworkType(RadioInfo.NETWORK_GPRS))
            return "GPRS";
        if(isNetworkType(RadioInfo.NETWORK_IDEN))
            return "IDEN";
        if(isNetworkType(RadioInfo.NETWORK_802_11))
            return "WiFi";
        return "None";
    }
	
	public Geopd() throws IOException {
		//pushScreen(new SalutationScreen(Utilitarios.GetConnectionID()));

		String celid = "";
		
		String mcc = "";

		String mnc = "";
		
		String lac = "";
		
		String extraInfo = "";
		
		if(isNetworkType(RadioInfo.NETWORK_CDMA))
        {
			mcc = Integer.toString(CDMAInfo.getCellInfo().getSID());
			mnc = Integer.toString(CDMAInfo.getCellInfo().getNID());
            // No LAC on CDMA -- http://supportforums.blackberry.com/rim/board/message?board.id=java_dev&thread.id=2839
			lac = "";
			celid = Integer.toString(CDMAInfo.getCellInfo().getBID());
			extraInfo = networktypes()+"-"+CDMAInfo.getChannelNumber();

        } else if(isNetworkType(RadioInfo.NETWORK_GPRS)) {
        	mcc = Integer.toString(GPRSInfo.getCellInfo().getMCC());
        	mnc = Integer.toString(RadioInfo.getMNC(RadioInfo.getCurrentNetworkIndex()));
        	lac = Integer.toString(GPRSInfo.getCellInfo().getLAC());
        	celid = Integer.toString(GPRSInfo.getCellInfo().getCellId());
        	extraInfo = "&extraInfo="+networktypes()+"-"+GPRSInfo.getCellInfo().getARFCN();
        }


		String str = "celid = " + celid + "\n mcc = " + mcc + "\n mnc = " + mnc + "\n lac = " + lac + "\n extraInfo = " + extraInfo;
		
		pushScreen(new SalutationScreen(str));
		//LocationTracker lt = new LocationTracker();
		//lt.run();
		
	}

	/**
	 * @param args
	 * @throws IOException 
	 */
	public static void main(String[] args) throws IOException {
		
		Geopd _geopd = new Geopd();
		
		_geopd.enterEventDispatcher();
		

	}

}
It works fine I get all paramters but when I use them in this url given by OpenCellID url:

http://www.opencellid.org/cell/get?k...200&cellid=234

it doesnt return latitude and longitud.

So what Im doing wrong?

PS: I getting values from real device and then testing url in my Desktop Computer.

Thanks,

Demian.
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: OpenCellID doesnt work
Thread Thread Starter Forum Replies Last Post
HOWTO: Use BlackBerry on Generic NON-BlackBerry Data Plan Mark Rejhon BlackBerry Network 92 03-08-2014 12:26 PM
Work Email Restriction Issues? ricpac General BlackBerry Discussion 2 12-13-2007 10:23 AM
webmail on BIS fine, work email not ahw01 General BlackBerry Discussion 1 11-05-2007 12:57 PM
Blackberry Work in Korea? wangta01 General BlackBerry Discussion 10 09-27-2006 08:55 AM
Help Home address and Work address fabius Developer Forum 2 09-26-2006 05:52 AM

AASTRA 6731i Phone A6731-0131-10-01 Black Display 31i POE LAN VOIP IP
$32.0
AASTRA 6731i Phone A6731-0131-10-01 Black Display 31i POE LAN VOIP IP  pictureThe VoIP Lounge 12 ft Gray Handset Curly Cord for Cisco 7900 Series IP Phones
$10.65
The VoIP Lounge 12 ft Gray Handset Curly Cord for Cisco 7900 Series IP Phones pictureGrandstream GXW4216 16 FXS Port VoIP Gateway w/ Rack Ears, PWR Supply *Warranty*
$195.0
Grandstream GXW4216 16 FXS Port VoIP Gateway w/ Rack Ears, PWR Supply *Warranty* pictureAvaya Nortel BCM 450 R6 6.0 VoIP Phone System 1000 Mailboxes 52 IP 1 Expansion
$2495.0
Avaya Nortel BCM 450 R6 6.0 VoIP Phone System 1000 Mailboxes 52 IP 1 Expansion pictureAvaya Nortel BCM 450 R5 5.0 Phone System 80 Mailboxes MCDN Q.Sig VoIP GW IP Exp
$2495.0
Avaya Nortel BCM 450 R5 5.0 Phone System 80 Mailboxes MCDN Q.Sig VoIP GW IP Exp picture






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