How can I get the current AppInfo of the running UWP application? I could not find any accessible constructor or static function to get this information.
You could get AppDiagnosticInfo of all uwp apps that are running by the following code.
var list = await AppDiagnosticInfo.RequestInfoAsync();
And then you could get AppInfo from each item in the AppDiagnosticInfo list.
foreach (var diagnosticinfo in list)
{
info = diagnosticinfo.AppInfo;
}
var id = info.Id;
Please note that you need to declare the following capabilities in the Package.appxmainfest.