online Layers
This list indicates layers that will not be taken offline and will continue to reference online services. In some situations, you may wish to prevent a layer from being taken offline even though it is supported. For example, by continuing to reference the live online service for a com.arcgismaps.mapping.layers.FeatureLayer, you can benefit from the most up-to-date information. You can choose to keep layers from the map's operational layers or basemap layers collections online.
To make the offline map continue to reference an online layer add it to the GenerateOfflineMapParameterOverrides.onlineLayers collection. By adding a com.arcgismaps.mapping.layers.Layer to this list, you indicate that the layer will not be taken offline but will instead continue to reference the online service. Be aware that the resulting offline map will require a network connection and may also require authentication.
Note that if a com.arcgismaps.mapping.layers.Layer is included in this collection it will not be taken offline - you should update the relevant parameters to remove the details pertaining to that layer:
GenerateOfflineMapParameterOverrides.exportTileCacheParameters can be removed to prevent an com.arcgismaps.mapping.layers.ArcGISTiledLayer from being taken offline
GenerateOfflineMapParameterOverrides.exportVectorTilesParameters can be removed to prevent an com.arcgismaps.mapping.layers.ArcGISVectorTiledLayer from being taken offline
GenerateOfflineMapParameterOverrides.generateGeodatabaseParameters can be removed for an entire feature service or updated to remove an individual com.arcgismaps.mapping.layers.FeatureLayer using com.arcgismaps.tasks.geodatabase.GenerateGeodatabaseParameters.layerOptions
If a feature service contains many tables in the web map, you can choose to keep specific layers online by adding them to the GenerateOfflineMapParameterOverrides.onlineLayers collection and updating the GenerateOfflineMapParameterOverrides.generateGeodatabaseParameters to remove the specific layers. Any remaining feature layers or stand-alone tables that you wish to take offline can be configured using the com.arcgismaps.tasks.geodatabase.GenerateGeodatabaseParameters.layerOptions for the service in GenerateOfflineMapParameterOverrides.generateGeodatabaseParameters.
When you create a GenerateOfflineMapParameterOverrides object, this collection will be populated according to the GenerateOfflineMapParameters.onlineOnlyServicesOption setting in the original parameters. Things to consider are:
If you set GenerateOfflineMapParameters.onlineOnlyServicesOption to OnlineOnlyServicesOption.Exclude then this collection will be empty
If you set GenerateOfflineMapParameters.onlineOnlyServicesOption to OnlineOnlyServicesOption.Include then this collection will contain each online-only com.arcgismaps.mapping.layers.Layer in the web map. For example, layers that cannot be taken offline.
If you set GenerateOfflineMapParameters.onlineOnlyServicesOption to OnlineOnlyServicesOption.UseAuthoredSettings then this collection will contain each com.arcgismaps.mapping.layers.Layer that the web map author selected to remain online
Since
200.1.0