Universal Windows Platform (UWP)
A Microsoft platform for building and publishing apps for Windows desktop devices.
2,902 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello,
I am trying to open app from other app where the opened app has a protocol defined in its manifest.
I use such code:
public async void OpenOrShowInStore(string customCampaignId)
{
//if not instaled go to
LauncherOptions options = new LauncherOptions();
if (customCampaignId == "")
{
options.FallbackUri = appWinStoreProtocolUri;
}
else
{
if (Uri.TryCreate(appWinStoreProtocolUri.OriginalString + "&cid=" + customCampaignId, UriKind.RelativeOrAbsolute, out Uri newUri))
{
var a = newUri.OriginalString;
options.FallbackUri = newUri;
}
else
options.FallbackUri = appWinStoreProtocolUri;
}
var success = await Windows.System.Launcher.LaunchUriAsync(appUri, options);
}
The protocol is defined in opened app manifest in declaration section.
Main app is instaled as flight package, opened app is instaled as flight package too.
OnActivated(IActivatedEventArgs args) event isnt implemented in opened app because I do nothing when I open the app, I want simplu opent it.
Result of my code is such that opened app opens, but is stuck on splash screen.
How to fix this problem?