- 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.CAR_DOCK" />
|
||||||
<category android:name="android.intent.category.DESK_DOCK" />
|
<category android:name="android.intent.category.DESK_DOCK" />
|
||||||
</intent-filter>
|
</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>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.VIEW" />
|
<action android:name="android.intent.action.VIEW" />
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<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>
|
</intent-filter>
|
||||||
<receiver android:name="net.osmand.plus.audionotes.MediaRemoteControlReceiver">
|
<receiver android:name="net.osmand.plus.audionotes.MediaRemoteControlReceiver">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
|
|
|
@ -324,12 +324,18 @@ public class MapActivity extends AccessibleActivity {
|
||||||
}
|
}
|
||||||
|
|
||||||
final Intent intent = getIntent();
|
final Intent intent = getIntent();
|
||||||
if (intent != null && intent.getData() != null)
|
if (intent != null)
|
||||||
{
|
{
|
||||||
final Uri data = intent.getData();
|
if (Intent.ACTION_VIEW.equals(intent.getAction()))
|
||||||
if ("file".equalsIgnoreCase(data.getScheme()))
|
|
||||||
{
|
{
|
||||||
showImportedGpx(data.getPath());
|
if (intent.getData() != null)
|
||||||
|
{
|
||||||
|
final Uri data = intent.getData();
|
||||||
|
if ("file".equalsIgnoreCase(data.getScheme()))
|
||||||
|
{
|
||||||
|
showImportedGpx(data.getPath());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue