GPS location / Cell id / Placing a call
29 April 2008This post presents miscellanoeous tasks that you can do in your J2ME application.
Firstly, how to get GPS location. javax.microedition.location.Location provides support for this. Review the snippet below:
LocationProvider loc = LocationProvider.getInstance(null); loc.setLocationListener(ll,0,-1,-1); Location location = loc.getLocation(60*3); String lat = location.getQualifiedCoordinates().getLatitude(); String lon = location.getQualifiedCoordinates().getLongitude();
Getting cell id is very easy:
String cellID = System.getProperty("phone.cid");
For placing a call, you n eed com.motorola.phone.
Dialer dialer = Dialer.getDefaultDialer(); dialer.startCall("6172531000");
Related Posts:
Top Of Page | Trackback
If you found this page useful, consider linking to it. Simply copy and paste the code below into your web site.
It will look like this: GPS location / Cell id / Placing a call