InstallationManager.FindPackagesForCurrentPublisher | findPackagesForCurrentPublisher method

Returns all the app packages with the same publisher ID as the app calling this method.

Syntax


Public Shared Function FindPackagesForCurrentPublisher() As IEnumerable(Of Package)

Parameters

This method has no parameters.

Return value

Type: IIterable<Package> [JavaScript/C++] | System.Collections.Generic.IEnumerable<Package> [.NET]

A list of app packages with the same publisher ID as the app calling this method.

Remarks

This method returns all applications associated with the publisher ID of the calling app. This includes:

  • Apps preloaded on the phone.
  • Apps installed by the user.
  • Apps currently stored on the phone's SD card.
  • Enterprise apps.

Examples


using Windows.ApplicationModel;
using Windows.Phone.Management.Deployment;

void DisplayApplicationInfo(string ProductId)
{
         
    IEnumerable<Package> packages = InstallationManager.FindPackagesForCurrentPublisher();

    // Loop over all installed applications looking for the specified ProductId 
    // (not the most efficient way to search, but a simple way to show how to use   
    // the functionality. 
    foreach (Package package in packages)
    {
        if (package.Id.ProductId.ToString().ToLower()== ProductId.ToLower())
        {
            // Dislay the title info in the ApplicationTitle textlock.
            ApplicationTitle.Text = package.Id.Name;

            // Retrieve the icon image by getting its DSS Token.
            string token = package.GetThumbnailToken();

            // Do something with image token.
        
        }
    }
}

You can also use this method to see if other apps from your publisher ID are installed on a phone. If they’re installed, you can launch them. To demonstrate, the following example enumerates all apps for the current publisher ID and launches the first app in the enumeration (unless that app happens to be the current app).


IEnumerable<Package> apps = Windows.Phone.Management.Deployment.InstallationManager.FindPackagesForCurrentPublisher();
apps.First().Launch(string.Empty);


Requirements (device family)

Device family

Mobile

API contract

Windows.Phone.PhoneContract, introduced version 1.0

Namespace

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

Metadata

Windows.Phone.PhoneContract.winmd

Requirements (operating system)

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

 

 

Community Additions

ADD
Show:
© 2015 Microsoft