Using Android sdk 100.1, can we generate MMPK file on the fly?

643
3
09-03-2017 11:34 PM
ArchanaSingh
New Contributor II

Can we generate and download MMPK file on the fly for any extent selected by the user using Android SDK 100.1? 

0 Kudos
3 Replies
AlexanderNohe1
Occasional Contributor III

Not for MMPKs.  This is an all in one package that can be stored online and downloaded all at once to the device.

I believe what you are looking for is ad-hoc offline which allows you to take a webmap that you have hosted on ArcGIS Online offline based upon an extent.  This should be possible via the com.esri.arcgisruntime.tasks.offlinemap| arcgis-android  package.

ArchanaSingh
New Contributor II

Thanks for replying Alexander.

Yes are looking for offline based on extent but we are not using webmaps. We have native apps developed on Android, iOS and Windows Phone platform and map consists of basemaps and operational layers from ArcGIS server 10.5. Is there a way to dynamically download the data on the fly based on extent selected by user?

0 Kudos
AlexanderNohe1
Occasional Contributor III

So two options...

1) Build a webmap in portal or agol and supply that to the aforementioned class to download.  (You stated that this would not suite your workflow)

2) Use this class for each layer you would like to take offline and store those layers in storage somewhere:  GeodatabaseSyncTask| arcgis-android You can use createDefaultGenerateGeodatabaseParametersAsync(Geometry extent) to specify the extent you would like to take offline for each layer you construct with the synctask.

0 Kudos