none
[UWP] UWP apps - communicate across devices

    Question

  • We need to build a UWP app which will run on a desktop (which works like a server) and another UWP app which will run on tablets (which works like a client). All these will be in the same local network. The server app will contain some images, videos, 3D models (some of them can be large files around 100 MB or more) and when a button is clicked on that app we need to send that image/video/model to the client app on the tablet. We started researching on the options of doing that and these are the main options we found.

    - App services - https://docs.microsoft.com/en-us/windows/uwp/launch-resume/how-to-create-and-consume-an-app-service

    - Sockets - https://docs.microsoft.com/en-us/windows/uwp/networking/sockets

    - Share contract (not sure whether this is available across devices, have to read more) - https://docs.microsoft.com/en-us/windows/uwp/app-to-app/

    We are planning to create some samples with these options and see what we can do with each option. In the mean time would like to get any ideas from the experts about Pros and Cons of using each of these methods to send data from one UWP app to the other. Also please let me know if I have missed any other options that we can try.
    Friday, March 15, 2019 8:20 AM

All replies

  • Hello Madhu_AtLink,

    The following two things can be your chioce:

    1. Project Rome: Connected apps and devices (Project Rome)

    2. Sockets

    The app service and share contract you provided are basic things that you need to learn when working with UWP. However, commonly they are not used for cross device scenario. A common app service is used for apps on the device, remote device app service belongs to project rome. The share data function is used to share data from current UWP app to other apps. 

    To check for samples to understand more:

    1. Project Rome:https://github.com/Microsoft/Windows-universal-samples/tree/dev/Samples/RemoteSystems

    2. Sockets:https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/StreamSocket

    Project Rome looks like the most suitable technology since it is also used for cross devices. However since I haven't tested it for large data communication, I'm not so sure about its performance. Anyway, I think it's a good idea for you to start from it first. 

    Best regards,

    Barry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    22 hours 25 minutes ago
    Moderator