forked from organicmaps/organicmaps
[android] Added Mapsme scheme intent processor
This commit is contained in:
parent
b50aaf2bcf
commit
76fe38a833
3 changed files with 26 additions and 0 deletions
|
@ -174,6 +174,16 @@
|
|||
android:scheme="https"/>
|
||||
</intent-filter>
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW"/>
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
<category android:name="android.intent.category.BROWSABLE"/>
|
||||
|
||||
<data
|
||||
android:scheme="mapsme"/>
|
||||
</intent-filter>
|
||||
|
||||
<!-- API CALL -->
|
||||
<intent-filter>
|
||||
<action android:name="com.mapswithme.maps.api.request"/>
|
||||
|
|
|
@ -95,6 +95,7 @@ public class DownloadResourcesLegacyActivity extends BaseMwmFragmentActivity
|
|||
Factory.createBookmarkCatalogueProcessor(),
|
||||
Factory.createOldCoreLinkAdapterProcessor(),
|
||||
Factory.createOpenCountryTaskProcessor(),
|
||||
Factory.createMapsmeProcessor(),
|
||||
Factory.createKmzKmlProcessor(this),
|
||||
Factory.createShowOnMapProcessor(),
|
||||
Factory.createBuildRouteProcessor()
|
||||
|
|
|
@ -101,6 +101,12 @@ public class Factory
|
|||
return new GeoIntentProcessor();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static IntentProcessor createMapsmeProcessor()
|
||||
{
|
||||
return new MapsmeProcessor();
|
||||
}
|
||||
|
||||
private static abstract class LogIntentProcessor implements IntentProcessor
|
||||
{
|
||||
private static final Logger LOGGER = LoggerFactory.INSTANCE.getLogger(LoggerFactory.Type.MISC);
|
||||
|
@ -151,6 +157,15 @@ public class Factory
|
|||
}
|
||||
}
|
||||
|
||||
private static class MapsmeProcessor extends BaseOpenUrlProcessor
|
||||
{
|
||||
@Override
|
||||
public boolean isSupported(@NonNull Intent intent)
|
||||
{
|
||||
return "mapsme".equals(intent.getScheme());
|
||||
}
|
||||
}
|
||||
|
||||
private static class HttpGe0IntentProcessor implements IntentProcessor
|
||||
{
|
||||
@Override
|
||||
|
|
Loading…
Add table
Reference in a new issue