diff options
Diffstat (limited to 'main/src/cgeo/geocaching/apps/cache/navi/PebbleApp.java')
| -rw-r--r-- | main/src/cgeo/geocaching/apps/cache/navi/PebbleApp.java | 28 |
1 files changed, 5 insertions, 23 deletions
diff --git a/main/src/cgeo/geocaching/apps/cache/navi/PebbleApp.java b/main/src/cgeo/geocaching/apps/cache/navi/PebbleApp.java index 8ba3bef..ac83085 100644 --- a/main/src/cgeo/geocaching/apps/cache/navi/PebbleApp.java +++ b/main/src/cgeo/geocaching/apps/cache/navi/PebbleApp.java @@ -1,17 +1,15 @@ package cgeo.geocaching.apps.cache.navi;
-import cgeo.geocaching.Geocache;
import cgeo.geocaching.R;
import cgeo.geocaching.geopoint.Geopoint;
-import android.app.Activity;
import android.content.Intent;
/**
* Application for communication with the Pebble watch.
- *
+ *
*/
-class PebbleApp extends AbstractPointNavigationApp {
+class PebbleApp extends AbstractRadarApp {
private static final String INTENT = "com.webmajstr.pebble_gc.NAVIGATE_TO";
private static final String PACKAGE_NAME = "com.webmajstr.pebble_gc";
@@ -21,24 +19,8 @@ class PebbleApp extends AbstractPointNavigationApp { }
@Override
- public void navigate(Activity activity, Geopoint point) {
- final Intent pebbleIntent = new Intent(INTENT);
- pebbleIntent.putExtra("latitude", point.getLatitude());
- pebbleIntent.putExtra("longitude", point.getLongitude());
- activity.startActivity(pebbleIntent);
+ protected void addCoordinates(final Intent intent, final Geopoint coords) {
+ intent.putExtra("latitude", coords.getLatitude());
+ intent.putExtra("longitude", coords.getLongitude());
}
-
- @Override
- public void navigate(Activity activity, Geocache cache) {
- final Intent pebbleIntent = new Intent(INTENT);
- pebbleIntent.putExtra("latitude", cache.getCoords().getLatitude());
- pebbleIntent.putExtra("longitude", cache.getCoords().getLongitude());
- pebbleIntent.putExtra("difficulty", cache.getDifficulty());
- pebbleIntent.putExtra("terrain", cache.getTerrain());
- pebbleIntent.putExtra("name", cache.getName());
- pebbleIntent.putExtra("code", cache.getGeocode());
- pebbleIntent.putExtra("size", cache.getSize().getL10n());
- activity.startActivity(pebbleIntent);
- }
-
}
\ No newline at end of file |
