1

Is there a way for apps running on WinRT to share information? I know about WinRT's sandboxing and the reasons behind it, but is there some mechanism for two apps created by the same author to share information or pass data between each other? A global property bag, or existing inter-app push notification or messaging scheme? I already use the Share contract mechanism for other tasks but that involves invoking the Share charm and I just want to pass a simple text message between two WinRT apps I authored. Perhaps a shared storage area restricted to apps with the same publisher ID?

I found the following related posts but none of them provide a Windows Store requirements compatible solution:

Communication between Windows Store app and native desktop application

How can a Metro app in Windows 8 communicate with a backend desktop app on the same machine?

Inter application communication in WinRT

Community
  • 1
  • 1
Robert Oschler
  • 14,153
  • 18
  • 94
  • 227

1 Answers1

2

You could use protocol activation to pass short strings between apps. Also you could point both apps at a file and use it to store shared data, but you'd need user input to be able to access the file. The good thing is though - if you'd store the file in say your OneDrive folder - your file would get automatically backed up and synced between devices. Since we are there - you could use the OneDrive SDK.

Filip Skakun
  • 31,624
  • 6
  • 74
  • 100
  • Can two WinRT apps share a common file? I thought each app's file storage was isolated? If they can, please point me to a link that explains this. OneDrive is a nice idea but would be too slow, at least from the OneDrive load/save tests I've done. I want something that transfers the message in the sub-1 second range. – Robert Oschler Apr 01 '14 at 17:37
  • 1
    WinRT apps can both be pointed to a user-selected file and 'share' that file, wherever it is. – Nate Diamond Apr 01 '14 at 17:49