InstallationManager.AddPackageAsync(String, Uri) | addPackageAsync(String, Uri) method

Applies to Windows Phone only

Starts the installation process for the app specified by the app title and location URI.

Syntax


Public Shared Function AddPackageAsync(
  title As String,  
  sourceLocation As Uri 
) As IAsyncOperationWithProgress(Of PackageInstallResult, UInt32)

Parameters

title

Type: String [JavaScript] | System.String [.NET] | Platform::String [C++]

The name of the app to install.

sourceLocation

Type: Windows.Foundation.Uri [JavaScript] | System.Uri [.NET] | Windows::Foundation::Uri [C++]

The URI location of the app to install.

Return value

Type: IAsyncOperationWithProgress<PackageInstallResult, UInt32>

The asynchronous operation that represents the installation process.

Examples


void InstallMyCoolApp()
{
    Uri uri = new Uri(@"https://PlaceHolderServerName/XAP/MyCoolApp.xap");
    string appTitle = "Cool App";

    Windows.Foundation.IAsyncOperationWithProgress<PackageInstallResult, uint> result;

    // Queue up an installation request.
    result = InstallationManager.AddPackageAsync(appTitle, uri);

    // Note: You could save "result" as a member variable to enable 
    // the installation to be cancelled later.
}

Requirements

Minimum supported client

None supported

Minimum supported server

None supported

Minimum supported phone

Windows Phone 8

Namespace

Windows.Phone.Management.Deployment
Windows::Phone::Management::Deployment [C++]

Metadata

Windows.WinMD

See also

InstallationManager
AddPackageAsync(String, Uri, String, String, Uri)

 

 

Community Additions

ADD
Show:
© 2014 Microsoft