Show / Hide Table of Contents

Method UnpackAsync

UnpackAsync(String, String)

Unpacks a mobile map package file (.mmpk) to an output directory.

Declaration
public static Task UnpackAsync(string mobileMapPackageFilePath, string outputDirectory)
Parameters
Type Name Description
System.String mobileMapPackageFilePath

The path to a mobile map package file (.mmpk)

System.String outputDirectory

The path to a directory to write the mobile map package contents.

Returns
Type Description
Task

A Task representing the asynchronous unpack operation.

Remarks

A package can contain data or functionality that can only be used when the package is unpacked. One reason to unpack a mobile map packages is data content, raster files in particular require the package to be in an unpacked format before the mobile map package can be successfully loaded. Use Esri.ArcGISRuntime.Mapping.MobileMapPackage.IsDirectReadSupportedAsync(System.String) to determine if a package needs to be unpacked. If the last level of the outputDirectory is not present it will be created as part of the unpack task.

Exceptions
Type Condition
ExpiredException

Package was authored to prevent expired access.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 100.15
.NET 6.0100.13 - 100.15
.NET 6.0 Windows100.13 - 100.15
.NET Framework100.3 - 100.15
.NET 5100.10 - 100.12
.NET Core 3.1100.7 - 100.12
Xamarin.Android100.3 - 100.15
Xamarin.iOS100.3 - 100.15
UWP100.3 - 100.15

UnpackAsync(String, String, CancellationToken)

Unpacks a mobile map package file (.mmpk) to an output directory.

Declaration
public static Task UnpackAsync(string mobileMapPackageFilePath, string outputDirectory, CancellationToken cancellationToken)
Parameters
Type Name Description
System.String mobileMapPackageFilePath

The path to a mobile map package file (.mmpk)

System.String outputDirectory

The path to a directory to write the mobile map package contents.

CancellationToken cancellationToken

A CancellationToken for canceling the unpack operation.

Returns
Type Description
Task

A Task representing the asynchronous unpack operation.

Remarks

A package can contain data or functionality that can only be used when the package is unpacked. One reason to unpack a mobile map packages is data content, raster files in particular require the package to be in an unpacked format before the mobile map package can be successfully loaded. Use Esri.ArcGISRuntime.Mapping.MobileMapPackage.IsDirectReadSupportedAsync(System.String) to determine if a package needs to be unpacked. If the last level of the outputDirectory is not present it will be created as part of the unpack task. The returned task can be canceled with cancellationToken to abort the unpack.

Exceptions
Type Condition
ExpiredException

Package was authored to prevent expired access.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 100.15
.NET 6.0100.13 - 100.15
.NET 6.0 Windows100.13 - 100.15
.NET Framework100.3 - 100.15
.NET 5100.10 - 100.12
.NET Core 3.1100.7 - 100.12
Xamarin.Android100.3 - 100.15
Xamarin.iOS100.3 - 100.15
UWP100.3 - 100.14
In This Article
Back to top Copyright © 2022 Esri.