diff --git a/OsmAnd/AndroidManifest.xml b/OsmAnd/AndroidManifest.xml index 3944759dbb..cfc9607921 100644 --- a/OsmAnd/AndroidManifest.xml +++ b/OsmAnd/AndroidManifest.xml @@ -68,10 +68,15 @@ + + - + + + + diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java index cd2298c6f7..ec24d1644d 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java @@ -324,12 +324,18 @@ public class MapActivity extends AccessibleActivity { } final Intent intent = getIntent(); - if (intent != null && intent.getData() != null) + if (intent != null) { - final Uri data = intent.getData(); - if ("file".equalsIgnoreCase(data.getScheme())) + if (Intent.ACTION_VIEW.equals(intent.getAction())) { - showImportedGpx(data.getPath()); + if (intent.getData() != null) + { + final Uri data = intent.getData(); + if ("file".equalsIgnoreCase(data.getScheme())) + { + showImportedGpx(data.getPath()); + } + } } }