- improvements : import from dropbox ; ES-FileExplorer local&cloud
This commit is contained in:
parent
04ba81b1a1
commit
9644e4b80d
2 changed files with 16 additions and 5 deletions
|
@ -68,10 +68,15 @@
|
|||
<category android:name="android.intent.category.CAR_DOCK" />
|
||||
<category android:name="android.intent.category.DESK_DOCK" />
|
||||
</intent-filter>
|
||||
<!-- android matches non-greedy : http://stackoverflow.com/questions/3400072/pathpattern-to-match-file-extension-does-not-work-if-a-period-exists-elsewhere-i-->
|
||||
<!-- mimeType&host are both needed or you will either have unwanted matching or no match when needed -->
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<data android:scheme="file" android:host="*" android:pathPattern=".*\\.gpx" android:mimeType="*/*" />
|
||||
<data android:scheme="file" android:host="*" android:mimeType="*/*" android:pathPattern=".*\\.gpx"/>
|
||||
<data android:scheme="file" android:host="*" android:mimeType="*/*" android:pathPattern=".*\\..*\\.gpx"/>
|
||||
<data android:scheme="file" android:host="*" android:mimeType="*/*" android:pathPattern=".*\\..*\\..*\\.gpx"/>
|
||||
<data android:scheme="file" android:host="*" android:mimeType="*/*" android:pathPattern=".*\\..*\\..*\\..*\\.gpx"/>
|
||||
</intent-filter>
|
||||
<receiver android:name="net.osmand.plus.audionotes.MediaRemoteControlReceiver">
|
||||
<intent-filter>
|
||||
|
|
|
@ -324,13 +324,19 @@ public class MapActivity extends AccessibleActivity {
|
|||
}
|
||||
|
||||
final Intent intent = getIntent();
|
||||
if (intent != null && intent.getData() != null)
|
||||
if (intent != null)
|
||||
{
|
||||
if (Intent.ACTION_VIEW.equals(intent.getAction()))
|
||||
{
|
||||
if (intent.getData() != null)
|
||||
{
|
||||
final Uri data = intent.getData();
|
||||
if ("file".equalsIgnoreCase(data.getScheme()))
|
||||
{
|
||||
showImportedGpx(data.getPath());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
View progress = mapLayers.getMapInfoLayer().getProgressBar();
|
||||
|
|
Loading…
Reference in a new issue