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

1 piece Power Relay Coil 24VDC 24V SPDT 250VAC 30VDC Contact Rating 10A
$2.97
1 piece Power Relay Coil 24VDC 24V SPDT 250VAC 30VDC Contact Rating 10A pictureACF19 Air Conditioner Coil Foaming Cleaner 19 oz. Can. FROST KING ACF19
$15.0
ACF19 Air Conditioner Coil Foaming Cleaner 19 oz. Can. FROST KING ACF19 pictureDewalt DW66C1 Siding Fencing Coil Nailer Air Tool 423105 E30
$0.99
Dewalt DW66C1 Siding Fencing Coil Nailer Air Tool  423105 E30 picture3( NEW DAYTON 5X825E 120V COIL RELAY 8 PIN & 5X852E BASE LOT OF 3
$19.99
3( NEW DAYTON 5X825E 120V COIL RELAY 8 PIN & 5X852E BASE LOT OF 3 pictureAllen-Bradley Reversing Starter 505-AOD Ser B, SIZE 0, 600 VAC, 120v COIL
$20.0
Allen-Bradley Reversing Starter 505-AOD Ser B, SIZE 0,  600 VAC, 120v COIL picture






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