Showing posts with label GeoPicker. Show all posts
Showing posts with label GeoPicker. Show all posts

Monday, July 6, 2009

How to use GeoPicker in your Android app?

Now, GeoPicker 1.1 support the Intent invoke, you can use it in your app.
If you want to ask user to choose a location, you can invoke GeoPoint by Intent. And it will return the coordinate the user picks.

-invoke GeoPicker

Intent intent = new Intent(Intent.ACTION_PICK);
intent.setClassName("com.android.lee.geopicker", "com.android.lee.geopicker.GeoPickerActivity");

/*option: the initial locaiton*/
intent.putExtra("lat", 25135022);
intent.putExtra("lon", 121516890);

startActivityForResult(intent, REQUEST);

-return coordinate

protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if(requestCode ==REQUEST && resultCode ==Activity.RESULT_OK){
int latE6 = data.getIntExtra("lat", 0);
int lonE6 = data.getIntExtra("lon", 0);
Log.d(TAG,String.valueOf(latE6));
Log.d(TAG,String.valueOf(lonE6));
}
}
-Show GeoPicker on Android Market, if GeoPicker isn't installed.
List resolvList=getPackageManager().queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY);
if(resolvList.isEmpty()){
Uri uri = Uri.parse("market://search?q=com.android.lee.geopicker");
Intent it = new Intent(Intent.ACTION_VIEW, uri);
startActivity(it);
}

Saturday, June 13, 2009

GeoPicker on Android

This is my first app on Android Market. Sometime I want to know the coordinates of a building, a address, a place or my current location. So I make this application for me and I like it. So I publish on Android Market and hope it can help someone.

I don't like a complex application. So GeoPicker is a simple and useful tool. I hope you will like it.
Please leave a comment,any suggestion will be welcome.


If you like this application, you can click the beer on the right to give me a beer, cheer.

lastest: GeoPicker ver. 1.1

support language: English, Traditional Chinese



How to use:

You can drag the pin or pan the map to anywhere. The panel on below will show the coordinates of the pin. You also can use menu->MyLocation to move pin to your current location.

Release History:
0.9->
  • MyLocation: move pin to your current location.
  • Format: change coordinates format
  • Satellite: switch map/satellite.
  • Search: reverse address geocoding, seach a place
0.91->
  • Copy: copy current location to ClipBoard
  • fix a little bug
0.92->
  • Direction: invoke Google map to direct from your current location to pin.
1.0->
  • coordinates in Clipboard will change to lat/lon:xx.xxx, xxx.xxxxx . I think maybe someone will misunderstand lat/lon,so I won't remove the lat/lon. But new format you can erase "lat/lon:" more easily.
  • panning map and drag pin smoother
  • click coordinates panel to change format
  • address geocoding
  • UI tuning
1.1->
  • provide a interface for other apps
  • copy address into clipboard
1.2->
  • customized copy format