How do I run an application inside an application container?

I am currently looking for a way to programmatically launch a modern application (uwp) inside an application container using the available Win32 APIs.

I don't want to run the application via the ': // app' protocol.

Instead, I want to create the app container myself, and then load the UWP app into it so I can access all memory, etc.

Is this possible, and if so, how?

+3


source to share


1 answer


Not sure if this helps, but is this what you are looking for? This answer and blog post are in C #. http://blogs.windows.com/buildingapps/2015/09/22/using-cross-app-communication-to-make-apps-work-together-10-by-10/

To disconnect from one application to another, you need to add a protocol declaration to the Package.appxmanifest of the application you want to navigate to.

In a container app, you can run an app that implements the protocol using:

Uri uri = new Uri("your-protocol-name");
await Launcher.LaunchUriAsync(uri);

      



If you want to run a specific application, you need to add a unique application name, which you will receive when registering your application:

var options = new LauncherOptions();
options.TargetApplicationPackageFamilyName = "12345.your.app";
Uri uri = new Uri("com.contoso.showproduct:?ProductId=3748937");
await Launcher.LaunchUriAsync(uri, options);

      

You can pass data to a new app with request parameters in your launch Uri. There is also a way to get data from another app using App Services.

-2


source







All Articles