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
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:

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

	private String networktypes()
            return "3G";
            return "CDMA";
            return "GPRS";
            return "IDEN";
            return "WiFi";
        return "None";
	public Geopd() throws IOException {
		//pushScreen(new SalutationScreen(Utilitarios.GetConnectionID()));

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

		String mnc = "";
		String lac = "";
		String extraInfo = "";
			mcc = Integer.toString(CDMAInfo.getCellInfo().getSID());
			mnc = Integer.toString(CDMAInfo.getCellInfo().getNID());
            // No LAC on CDMA --
			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();

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


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

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.


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

Symbol (Motorola) MC7090-PU0DCRFA8WR high memory numeric
Symbol (Motorola) MC7090-PU0DCRFA8WR high memory numeric pictureEscort Memory Systems CM11 Devicenet Interface Module
Escort Memory Systems CM11 Devicenet Interface Module pictureMODICON AS-MEEP-001 COMPACT 984 MEMORY EEPROM 8K
MODICON AS-MEEP-001 COMPACT 984 MEMORY EEPROM 8K picture5Pcs Micro Sd Sd Tf Card Memory Shield Module Storage Board Spi For Arduino Ic X
5Pcs Micro Sd Sd Tf Card Memory Shield Module Storage Board Spi For Arduino Ic X picture143230 New-No Box, Sato HG300801A Memory Chip, EHM MEM PCB-Rev0.0
143230 New-No Box, Sato HG300801A Memory Chip, EHM MEM PCB-Rev0.0 picture

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