Here is the screen shot
Next Step(s)!
Need to figure out how to use cell-id/lac information to get a lat/long for the phone location! Please drop me a note or add comments here if you have an idea on how to do it. Thanks.
Source
package org.apache; import android.app.Activity; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.telephony.PhoneStateIntentReceiver; import android.telephony.ServiceState; import android.util.Log; import android.widget.EditText; public class LocateMe extends Activity { private PhoneStateIntentReceiver mPhoneStateReceiver; private EditText mEditLac; private EditText mEditCid; private EditText mEditSignal; private static final int MY_NOTIFICATION_ID = 0x100; @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.main); mPhoneStateReceiver = new PhoneStateIntentReceiver(this, new ServiceStateHandler()); mPhoneStateReceiver.notifyServiceState(MY_NOTIFICATION_ID); mPhoneStateReceiver.notifyPhoneCallState(MY_NOTIFICATION_ID); mPhoneStateReceiver.notifySignalStrength(MY_NOTIFICATION_ID); mPhoneStateReceiver.registerIntent(); mEditLac = (EditText) findViewById(R.id.lac); mEditCid = (EditText) findViewById(R.id.cell_id); mEditSignal = (EditText) findViewById(R.id.signal_strength); } private class ServiceStateHandler extends Handler { public void handleMessage(Message msg) { Log.i("LocateMe", "In handleMessage : " + msg.what); switch (msg.what) { case MY_NOTIFICATION_ID: ServiceState state = mPhoneStateReceiver.getServiceState(); int cid = state.getCid(); int lac = state.getLac(); int signal = mPhoneStateReceiver.getSignalStrength(); mEditCid.setText("" + cid); mEditLac.setText("" + lac); mEditSignal.setText("" + signal); break; } } } }
Have a look at this thread here:
http://discussion.forum.nokia.com/forum/showthread.php?s=&threadid=19693
It’s a Symbian forum, but it goes into the whole topic of CellID -> Lat/Lng conversion
Hope it helps…. I’m not sure it will (as it’s a bit long and I’m only on the 1st page so far)
Comment by bloid — November 29, 2007 @ 10:06 am
This may be of use as well… It seems to use the yahoo flickr location service:
http://www.openwiki.com/ow.asp?CellIDToLocation
Comment by bloid — November 29, 2007 @ 10:14 am
Android — mobile operating system from google
http://www.allaboutandroid.net/phpbb/viewtopic.php?t=4
how to install the android
http://www.allaboutandroid.net/phpbb/viewtopic.php?t=2
android programming
http://www.allaboutandroid.net/phpbb/viewforum.php?f=1&sid=3a6736b573f38d5945b27d794f63fd09
android projects
http://www.allaboutandroid.net/phpbb/viewforum.php?f=2&sid=3a6736b573f38d5945b27d794f63fd09
Comment by mohit — November 29, 2007 @ 12:07 pm
Here is what you are looking for:
http://www.gnucitizen.org/blog/geo-tracking-mobile-phones
Note that you also need the MCC and MNC.
Comment by Nicolas — November 30, 2007 @ 7:52 am
[…] Android – Poor man’s “My Location” (Show current cell location) Many Thanks to Nicholas and bloid for comments on my previous blog post. Here’s an update with some commentary […]
Pingback by Android - Poor man’s “My Location” (Show current cell location) « Show me the code! — November 30, 2007 @ 12:28 pm
Android Location will be a revolutionary social mapping service to change the way people use mobile phones to keep in touch with their friends. It will facilitates real-world interaction between friends and puts an end to frustrating missed connections.
Using location-based technologies, Android Location lets you know where your friends are by automatically updating maps on your mobile handset. Android Location even lets you send messages to nearby friends or receive automatic alerts when they’re nearby so that you never miss an opportunity to meet. Android Location also lets you journal your life so that your friends can see what you’re up to. With Android Location, mobile subscribers put themselves on the map.
Features
+ Know where you are without having a GPS Connect with friends and get alerted where they are nearby
+ Explore places and events recommended by friends Recommend new places
+ Search for stuff to buy in nearby stores It will run on any Cell Phone Provider
+ It will run on any Phone (Blackberry, Android, Symbian, Windows Mobile)
+ It will be FREE
The application is being written in Android and J2ME and there are several people in the project with great programming knowledge, we are in an early stage of the project but we already know how to build the application, it’s only a matter of time to have the application up and running.
We are seeking for people that would like to join the project to help us build it faster.
http://www.androidlocation.com/
Comment by Andres Rormoser — February 1, 2008 @ 3:44 pm
hi
Im not expert in Java and i want to use this code to get cellid (bts gprs) by any phone.
i think that my probleme is not great :
when i write this code an error like : android.app.Activity dont existe
i want just to know integrate this api to my aps
sorry for english errors
Comment by tunisianway@hotmail.fr — March 15, 2008 @ 6:31 am
Would love to do this sort of thing but havnt a clue where to start. I’m glad the integration would be universal with all phone operating systems, that would be key.
Good luck with all future developments, bookmarked the site 🙂
Comment by Andy James — April 12, 2008 @ 7:32 pm
You plan too much. Cut down to size and concentrate on it.
Comment by loty — October 10, 2008 @ 1:26 pm
in the new Android SDK “beta release”
the method
int signal = mPhoneStateReceiver.getSignalStrength();
don’t exists , it there is new way of get the signal strength?
Comment by ahmdalitaha — November 7, 2008 @ 11:10 am
i am trying to find city location using android api for my app, i tried to download the LocateMe.Zip file, but link is not working, please give me the correct link, would be really helpful
Comment by android_dev — November 20, 2009 @ 2:00 pm
Why doesn’t it recognize the import android.telephony.PhoneStateIntentReceiver;
Does it require something. I’m using android 2.1 if it helps
Comment by wh — May 4, 2010 @ 2:36 pm
Thanks for the great article, I looked here often:)
Comment by Katal Og — December 26, 2010 @ 4:13 am
Also what?
Comment by LamuzNick — October 10, 2011 @ 2:03 pm
[…] https://davanum.wordpress.com/2007/11/29/android-access-cell-phone-details-cell-id-lac-signal-strengt… […]
Pingback by Tricks, Tips and Hacks for Android Developers | Hacking News | Security Tips | Website Hacks | Desktop Hacks | Mobile Hacks | Hack Recovery - ItsHacked.com — October 15, 2012 @ 12:19 am
Please let me know if you’re looking for a article author for your blog. You have some really good posts and I think I would be a good asset. If you ever want to take some of the load off, I’d absolutely love to write some content for your
blog in exchange for a link back to mine. Please shoot me an
email if interested. Kudos!
Comment by l — April 24, 2013 @ 6:44 pm