在 UWP 中获取已安装的应用程序列表
Get installed application list in UWP
我有一个应用程序需要读取用户移动设备上所有已安装应用程序的名称。但我不能那样做。
我如何在 windows 10 移动设备上获取通用 Windows 平台中已安装应用程序的列表?
感谢您的帮助
您需要添加Windows Mobile Extensions for the UWP
并使用以下代码:
if (ApiInformation.IsTypePresent("Windows.Phone.Management.Deployment.InstallationManager"))
{
var packages = Windows.Phone.Management.Deployment.InstallationManager.FindPackages();
foreach (var package in packages)
{
Debug.WriteLine(package.DisplayName);
}
}
但是此代码需要 ID_CAP_OEM_DEPLOYMENT
。据我所知 msdn
I would assume that you would require a company certificate and would have to sign your Apps with that certificate in order for those permissions to work.
我有一个应用程序需要读取用户移动设备上所有已安装应用程序的名称。但我不能那样做。 我如何在 windows 10 移动设备上获取通用 Windows 平台中已安装应用程序的列表?
感谢您的帮助
您需要添加Windows Mobile Extensions for the UWP
并使用以下代码:
if (ApiInformation.IsTypePresent("Windows.Phone.Management.Deployment.InstallationManager"))
{
var packages = Windows.Phone.Management.Deployment.InstallationManager.FindPackages();
foreach (var package in packages)
{
Debug.WriteLine(package.DisplayName);
}
}
但是此代码需要 ID_CAP_OEM_DEPLOYMENT
。据我所知 msdn
I would assume that you would require a company certificate and would have to sign your Apps with that certificate in order for those permissions to work.