<NME> OruxMapsApp.java
<BEF> package cgeo.geocaching.apps.navi;

import cgeo.geocaching.R;
import cgeo.geocaching.location.Geopoint;

import org.eclipse.jdt.annotation.NonNull;

import android.app.Activity;
import android.content.Intent;

class OruxMapsApp extends AbstractPointNavigationApp {

    private static final String ORUXMAPS_EXTRA_LONGITUDE = "longitude";
    private static final String ORUXMAPS_EXTRA_LATITUDE = "latitude";
    private static final String INTENT = "com.oruxmaps.VIEW_MAP_ONLINE";

    OruxMapsApp() {
        super(getString(R.string.cache_menu_oruxmaps), INTENT);
    }

    @Override
    public void navigate(final @NonNull Activity activity, final @NonNull Geopoint point) {
        final Intent intent = new Intent(INTENT);
        intent.putExtra(ORUXMAPS_EXTRA_LATITUDE, point.getLatitude());//latitude, wgs84 datum
        intent.putExtra(ORUXMAPS_EXTRA_LONGITUDE, point.getLongitude());//longitude, wgs84 datum

        activity.startActivity(intent);
    }

}

<MSG> Fix #5411, Add cache name to Orux app

- Add cache/waypoint name when calling orux
- Allow to also directly call display on the offline map

# Conflicts:
#	main/src/cgeo/geocaching/apps/navi/NavigationAppFactory.java

<DFF> @@ -1,30 +1,75 @@
 package cgeo.geocaching.apps.navi;
 
+import android.support.annotation.StringRes;
 import cgeo.geocaching.R;
+import cgeo.geocaching.activity.ActivityMixin;
 import cgeo.geocaching.location.Geopoint;
 
+import cgeo.geocaching.models.Geocache;
+import cgeo.geocaching.models.Waypoint;
 import org.eclipse.jdt.annotation.NonNull;
 
 import android.app.Activity;
 import android.content.Intent;
 
-class OruxMapsApp extends AbstractPointNavigationApp {
+abstract class OruxMapsApp extends AbstractPointNavigationApp {
 
-    private static final String ORUXMAPS_EXTRA_LONGITUDE = "longitude";
-    private static final String ORUXMAPS_EXTRA_LATITUDE = "latitude";
-    private static final String INTENT = "com.oruxmaps.VIEW_MAP_ONLINE";
+    private static final String ORUXMAPS_EXTRA_LONGITUDE = "targetLon";
+    private static final String ORUXMAPS_EXTRA_LATITUDE = "targetLat";
+    private static final String ORUXMAPS_EXTRA_NAME = "targetName";
+    private static final String INTENT_ONLINE = "com.oruxmaps.VIEW_MAP_ONLINE";
+    private static final String INTENT_OFFLINE = "com.oruxmaps.VIEW_MAP_OFFLINE";
 
-    OruxMapsApp() {
-        super(getString(R.string.cache_menu_oruxmaps), INTENT);
+    private OruxMapsApp(@StringRes final int nameResourceId, String intent) {
+        super(getString(nameResourceId), intent);
+    }
+
+    private void navigate(final @NonNull Activity activity, final @NonNull Geopoint point, final @NonNull String name) {
+        final Intent intent = new Intent(this.intent);
+        double[] targetLat = { point.getLatitude() };
+        double[] targetLon = { point.getLongitude() };
+        intent.putExtra(ORUXMAPS_EXTRA_LATITUDE, targetLat);//latitude, wgs84 datum
+        intent.putExtra(ORUXMAPS_EXTRA_LONGITUDE, targetLon);//longitude, wgs84 datum
+        if (!name.isEmpty()) {
+            String[] targetName = { name };
+            intent.putExtra(ORUXMAPS_EXTRA_NAME, targetName);
+        }
+
+        activity.startActivity(intent);
     }
 
     @Override
     public void navigate(final @NonNull Activity activity, final @NonNull Geopoint point) {
-        final Intent intent = new Intent(INTENT);
-        intent.putExtra(ORUXMAPS_EXTRA_LATITUDE, point.getLatitude());//latitude, wgs84 datum
-        intent.putExtra(ORUXMAPS_EXTRA_LONGITUDE, point.getLongitude());//longitude, wgs84 datum
+        navigate(activity, point, "Waypoint");
+    }
 
-        activity.startActivity(intent);
+    @Override
+    public void navigate(@NonNull Activity activity, @NonNull Geocache cache) {
+        if (cache.getCoords() != null) {
+            navigate(activity, cache.getCoords(), cache.getName());
+        } else {
+            ActivityMixin.showToast(activity, activity.getResources().getString(R.string.err_nav_no_coordinates));
+        }
     }
 
+    @Override
+    public void navigate(@NonNull Activity activity, @NonNull Waypoint waypoint) {
+        if (waypoint.getCoords() != null) {
+            navigate(activity, waypoint.getCoords(), waypoint.getName());
+        } else {
+            ActivityMixin.showToast(activity, activity.getResources().getString(R.string.err_nav_no_coordinates));
+        }
+    }
+
+    static class OruxOnlineMapApp extends OruxMapsApp {
+        OruxOnlineMapApp() {
+            super(R.string.cache_menu_oruxmaps_online, INTENT_ONLINE);
+        }
+    }
+
+    static class OruxOfflineMapApp extends OruxMapsApp {
+        OruxOfflineMapApp() {
+            super(R.string.cache_menu_oruxmaps_offline, INTENT_OFFLINE);
+        }
+    }
 }

Fix #5411, Add cache name to Orux app