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. This path must be specified without a trailing slash.

Returns
Type Description
System.Threading.Tasks.Task

A System.Threading.Tasks.Task representing the asynchronous unpack operation.

Remarks

If the last level of the outputDirectory is not present, it will be created as part of the unpack task. The unpack task writes the full content of the mobile map package to the output directory. Care should be taken on devices with limited storage space, especially if the original package is very large. After unpacking, you can remove the original .mmpk file from the device.

Note that unpacking will fail if the package is expired and was authored as PreventExpiredAccess.

Exceptions
Type Condition
ExpiredException

Package was authored to prevent expired access.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 200.7
.NET100.13 - 200.7
.NET Windows100.13 - 200.7
.NET Android200.0 - 200.7
.NET iOS200.0 - 200.7
.NET Framework100.3 - 200.7
Xamarin.Android100.3 - 100.15
Xamarin.iOS100.3 - 100.15
UWP100.3 - 200.7

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

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

System.Threading.CancellationToken cancellationToken

A System.Threading.CancellationToken for canceling the unpack operation.

Returns
Type Description
System.Threading.Tasks.Task

A System.Threading.Tasks.Task representing the asynchronous unpack operation.

Remarks

If the last level of the outputDirectory is not present, it will be created as part of the unpack task. The unpack task writes the full content of the mobile map package to the output directory. Care should be taken on devices with limited storage space, especially if the original package is very large. After unpacking, you can remove the original .mmpk file from the device.

Note that unpacking will fail if the package is expired and was authored as PreventExpiredAccess.

Exceptions
Type Condition
ExpiredException

Package was authored to prevent expired access.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 200.7
.NET100.13 - 200.7
.NET Windows100.13 - 200.7
.NET Android200.2 - 200.7
.NET iOS200.0 - 200.7
.NET Framework100.3 - 200.7
Xamarin.Android100.3 - 100.14
Xamarin.iOS100.3 - 100.15
UWP100.3 - 200.7
In This Article
Back to top Copyright © 2022 Esri.