Method is deprecated, use
Locus APIThis is useful function that allow you to add shortcut into point submenu in Locus, and call your application with point coordinates.
Simple example:
when you hold finger on screen, you then see address. Click on address and you get new point on place you tap (or when you click on red center cross, you get exactly map center). Now in last bottom submenu, is few items like Street view and more. And this tool add new item on top of this list. Nice :)
How to do this- register intent-filter for your activity
<intent-filter>
<action android:name="menion.android.locus.ON_POINT_ACTION" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
- now register intent receiver in your application.
if (getIntent().getAction().equals("menion.android.locus.ON_POINT_ACTION")) {
double lat = getIntent().getDoubleExtra("latitude", 0.0);
double lon = getIntent().getDoubleExtra("longitude", 0.0);
double alt = getIntent().getDoubleExtra("altitude", 0.0);
double acc = getIntent().getDoubleExtra("accuracy", 0.0);
// do what you want with this ...
}
and that's all.
Actual application that use this feature...
This feature is used in Foursquare4Locus (//https://market.android.com/details?id=cz.fabian.foursquarelocus) addon from version 0.2.1. See: viewtopic.php?f=26&t=550&p=3002#p3002 (http://forum.asamm.cz/viewtopic.php?f=26&t=550&p=3002#p3002)