Hello, Welcome to Micorosoft Q&A,
How can I share object reference between these 2 apps using shared memory?
Currently, UWP does not support share object with shared memory.
Is it possible to share object reference using "ValueSet"?
If you used AppService to implement app commination, you could send request data package with ValueSet
. For more please refer document here. And this is code sample that you could refer.
var message = new ValueSet();
message.Add("Command", "Item");
message.Add("ID", idx);
AppServiceResponse response = await this.inventoryService.SendMessageAsync(message);
When I was trying to send an object from the client app to the service app, it was getting NULL in the service app
Please check if the enter point is correct in the client, such as AppServiceName
, PackageFamilyName
. For more please refer General app service troubleshooting part
And you have another way to share data that use DataTransferManager
, for more detail please refer Share Data document. And we also provide code sample for you.(share source and share target)
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
ShareData does not support background, if you want share data within background, please use AppService. And we could not mix shareData and AppService. For other way is sharing your local app data by
PublisherCacheFolders
for more please refer this blog.