Google Maps Base Station location-google Mobile Maps API

Source: Internet
Author: User

If you have Google mobile Maps on your phone, you can find that as long as your mobile phone can connect GPRS, even if there is no GPS function, you can locate the location of your phone, but the accuracy is not accurate. Before we explore this principle, we need to know some mobile knowledge about what is Mnc/lac/cell ID.

Mobile Network Code (MNC)
Mobile network number, China Unicom CDMA System MNC 03, China Mobile is 00.

Mobile Country Code (MCC)
Mobile User Country code: 460

Location area Code (LAC)
Region area code, used to divide the area, generally a small place on a lac, Big place on ...



Cell Tower ID (cell ID)

Cellid represents a mobile base station, if you have base station data, check cellid you can know where the base station is, the mobile company or the police will know which base station you are calling.

What is the use of this information? This information will tell you which country, region and base station your mobile phone is connected to. So some anti-theft phone after the loss, will send some similar "mcc:460;" mnc:01; lac:7198:cellid:24989 "inside? js" type= "Text/javascript" > 1 sms to your designated number is the use of this information can be traced from the mobile to your stolen phone where the show. But it is useless to know, China's population is so dense, is around you do not know who is the thief:



Where does this information come from, the general mobile phone system provides the appropriate API to obtain this information (Tower info), such as window SmartPhone Or mobile is through the RIL.dll API to obtain, each mobile phone operating system is not the same, the relevant information can be used to check the relevant information.

With this information, if there is no base station information table, this information is not known where, because only mobile operators have relevant information, unless you are the operator or the police to get this information. is not we can not find the corresponding data, of course not, powerful Google has, here is to mention the Google Mobile Maps API, which contains a comparison of the entire base station information, China also has, is remote areas have no idea. Google Mobile maps itself is the use of this information, interested to try, no GPS module can also be positioned to your mobile phone location, but the precision is small, depending on the location of the base station from you how far.

Also we can develop the corresponding mobile application to locate, just call Google off-the-shelf API (Secret API) "Http://www.google.com/glm/mmap".

First read the Cellid and lac of your own phone.
Send a POST request through an HTTP connection to Http://www.google.com/glm/mmap.
Pass in the Cellid and Lac parameters, and return the latitude and longitude of the base station (Latitude/longitude) from the API.
There is another example that can be referenced (Windows Mobile) http://www.codeproject.com/KB/mobile/DeepCast.aspx

The following is an example of obtaining a phone IMEI number and Cellid (base station number) via J2ME



Package Jizhan;
Import Javax.microedition.lcdui.Command;
Import Javax.microedition.lcdui.CommandListener;
Import Javax.microedition.lcdui.Display;
Import javax.microedition.lcdui.Displayable;
Import Javax.microedition.lcdui.Form;
Import Javax.microedition.midlet.MIDlet;
Import javax.microedition.midlet.MIDletStateChangeException;

public class Getimeiandcellid extends MIDlet implements Commandlistener {
Private command Exitcommand = new command ("Exit", Command.exit, 1);

Form form = new Form ("Imei and Cellid");
display display = NULL;

Public Getimeiandcellid () {
display = Display.getdisplay (this);

}

protected void Destroyapp (Boolean arg0) {

}

protected void Pauseapp () {

}

protected void startApp () throws Midletstatechangeexception {
Get System Information
String info = system.getproperty ("Microedition.platform");
Get the IMEI number
String IMEI = "";
Cellid
String cellid = "";
Lac
String lac = "";
#if Polish.vendor==sony-ericsson
IMEI = System.getproperty ("Com.sonyericsson.imei");
Reference http://forums.sun.com/thread.jspa?threadID=5278668
https://developer.sonyericsson.com/message/110949
Cellid = System.getproperty ("Com.sonyericsson.net.cellid");
Get the Sony Ericsson
Lac = System.getproperty ("Com.sonyericsson.net.lac");
#else if Polish.vendor==nokia
IMEI = System.getproperty ("Phone.imei");
if (IMEI = null | | ". Equals (IMEI)) {
IMEI = System.getproperty ("Com.nokia.IMEI");
}
if (IMEI = null | | ". Equals (IMEI)) {
IMEI = System.getproperty ("Com.nokia.mid.imei");
}
Get to Cellid
Reference Http://wiki.forum.nokia.com/index.php/CS000947_-_Getting_Cell_ID_in_Java_ME
#if POLISH.GROUP==SERIES60
Cellid = System.getproperty ("Com.nokia.mid.cellid");
#else if Polish.group==series40
Cellid = System.getproperty ("Cell-id");
#endif
#else if Polish.vendor==siemens
IMEI = System.getproperty ("Com.siemens.imei");
#else if Polish.vendor==motorola
IMEI = System.getproperty ("Com.motorola.IMEI");
Cellid Reference http://web.mit.edu/21w.780/www/spring2007/guide/
Cellid = System.getproperty ("Cellid");
#else if Polish.vendor==samsung
IMEI = System.getproperty ("Com.samsung.imei");
#endif

if (IMEI = null | | ". Equals (IMEI)) {
IMEI = System.getproperty ("IMEI");
}

       //Show out
         Form.append ("PlatformInfo:" + info);
         form.append ("IMEI:" + IMEI);
         form.append ("cellid:" + cellid);
         Form.setcommandlistener (this);
         Form.addcommand (Exitcommand);
         display.setcurrent (form);
    }

public void Commandaction (Command cmd, displayable item) {
if (cmd = = Exitcommand) {
Destroyapp (FALSE);
Notifydestroyed ();
}
}

}


It is important to note that you must be a trusted MIDlet to access the data. That is, the MIDlet must be signed before the code can work, otherwise get null.
The following are from other places, have not been tested for reference.
a) Nokia = System.getproperty ("Com.nokia.mid.imei");
System.getproperty ("Com.nokia.IMEI");
System.getproperty ("Phone.imei");
b) Samsung
System.getproperty ("Com.samsung.imei");
c) Sony-ericsson
System.getproperty ("Com.sonyericsson.imei");

Imsi:imsi full name is the International Mobile Subscriber identification number, mobile User ID code. When the mobile phone is switched on, there is a process of registration in the process of accessing the network. The system through the control channel will be encrypted after the parameters of the group transmission to customers, mobile phone SIM card received parameters, and SIM card storage of customer authentication parameters after the same algorithm, the same result is allowed access, otherwise for illegal customers, The network refused to serve this customer. IMSI unique logo for a SIM card.
Imei:imei International Mobile Equipment Identity (International mobile device identity) is also known as the serial number, which uniquely marks a mobile device, such as a mobile phone. IMEI code is generally composed of 15 digits, the vast majority of GSM mobile phone Just Press "* #06 #", IMEI code will be displayed. The format is as follows: TAC is type Approval code, the device model approval number. FAC is final Assembly code, for the final assembly number. Snr that is serial number, for the factory serial numbers. SP is spare number, and is an alternate.

Sometimes we need to get the IMSI or IMEI number in the application to tie the application to the phone or SIM card. Access to the various types of mobile phones in different manufacturers are not the same, the Motorola RAZR E6 on the use of System.getproperty (). The corresponding program code is:

String imei= system.getproperty ("IMEI"); For E6
if (null = IMEI)
IMEI = System.getproperty ("Phone". IMEI ");

String IMSI = System.getproperty ("IMSI"); For E6
if (null = = IMSI)
IMEI = System.getproperty ("Phone". IMSI ");

g.DrawString ("IMEI:" +imei, M, Graphics.left | Graphics.top);

g.DrawString ("IMSI:" +imsi, Graphics.left | Graphics.top);



Reference Address:
Http://blog.csdn.net/phiger/archive/2009/07/22/4371922.aspx
Http://hi.baidu.com/lfcomputer/blog/item/0520e0d37a410a3c970a16c1.html
Http://wiki.forum.nokia.com/index.php/CS000947_-_Getting_Cell_ID_in_Java_ME

Http://www.cnblogs.com/psunny/archive/2009/10/22/1587779.html

  From this Learning network http://www.congci.com/item/218

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.