aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/res/values-de/strings.xml1
-rw-r--r--main/src/cgeo/geocaching/apps/cache/navi/NavigationAppFactory.java4
-rw-r--r--main/src/cgeo/geocaching/apps/cache/navi/SygicNavigationApp.java29
3 files changed, 33 insertions, 1 deletions
diff --git a/main/res/values-de/strings.xml b/main/res/values-de/strings.xml
index beb069c..08b4338 100644
--- a/main/res/values-de/strings.xml
+++ b/main/res/values-de/strings.xml
@@ -582,6 +582,7 @@
<string name="cache_menu_gcc">GCC</string>
<string name="cache_menu_whereyougo">WhereYouGo</string>
<string name="cache_menu_oruxmaps">OruxMaps</string>
+ <string name="cache_menu_sygic" translatable="false">Sygic</string>
<string name="cache_status">Status</string>
<string name="cache_status_offline_log">Gespeicherter Log</string>
<string name="cache_status_found">Gefunden</string>
diff --git a/main/src/cgeo/geocaching/apps/cache/navi/NavigationAppFactory.java b/main/src/cgeo/geocaching/apps/cache/navi/NavigationAppFactory.java
index 6e1d81c..57a71bb 100644
--- a/main/src/cgeo/geocaching/apps/cache/navi/NavigationAppFactory.java
+++ b/main/src/cgeo/geocaching/apps/cache/navi/NavigationAppFactory.java
@@ -46,7 +46,9 @@ public final class NavigationAppFactory extends AbstractAppFactory {
/** The external OruxMaps app */
ORUX_MAPS(new OruxMapsApp(), 9),
/** The external navigon app */
- NAVIGON(new NavigonApp(), 10);
+ NAVIGON(new NavigonApp(), 10),
+ /** The external Sygic app */
+ SYGIC(new SygicNavigationApp(), 11);
NavigationAppsEnum(App app, int id) {
this.app = app;
diff --git a/main/src/cgeo/geocaching/apps/cache/navi/SygicNavigationApp.java b/main/src/cgeo/geocaching/apps/cache/navi/SygicNavigationApp.java
new file mode 100644
index 0000000..e30bfc1
--- /dev/null
+++ b/main/src/cgeo/geocaching/apps/cache/navi/SygicNavigationApp.java
@@ -0,0 +1,29 @@
+package cgeo.geocaching.apps.cache.navi;
+
+import cgeo.geocaching.R;
+import cgeo.geocaching.geopoint.Geopoint;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.net.Uri;
+
+/**
+ * http://help.sygic.com/entries/22207668-developers-only-sygic-implementation-to-your-app-android-sdk-iphone-sdk-url-
+ * handler
+ *
+ */
+public class SygicNavigationApp extends AbstractPointNavigationApp {
+
+ private static final String PACKAGE = "com.sygic.aura";
+
+ SygicNavigationApp() {
+ super(getString(R.string.cache_menu_sygic), null, PACKAGE);
+ }
+
+ @Override
+ public void navigate(Activity activity, Geopoint coords) {
+ String str = "http://com.sygic.aura/coordinate|" + coords.getLongitude() + "|" + coords.getLatitude() + "|show";
+ activity.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(str)));
+ }
+
+} \ No newline at end of file