The following forum(s) are migrating to a new home on Microsoft Q&A (Preview): Developing Universal Windows apps!

Ask new questions on Microsoft Q&A (Preview).
Interact with existing posts until December 13, 2019, after which content will be closed to all new and existing posts.

Learn More

 none
UWP Push notifications - Reliability RRS feed

  • Question

  • Hi,

    We have two different UWP apps used in our project. From one App to the other we need to send some notification for a particular event. It is only one way from App1 to App2 only. I want to know whether we can use UWP push notifications for that.

    1. Can it be triggered from one app and be sent to another app?

    2. If so how reliable is it? Can we guarantee that it will always work, or is there a chance some might get dropped on the way?

    3. Can there be long delays to receive the notification?

    We need that notification to be sent without much delay and it needs to be sent for sure. In case if we cant use push notifications for that, what are the other options we have?

    Note :

    2 apps will always be running in 2 devices and we can assume always both the Apps will be running when sending the notification.

    Thanks,

    Madhurya


    • Edited by Madhu_AtLink Friday, September 27, 2019 10:06 AM Missing points
    Thursday, September 26, 2019 10:55 AM

All replies

  • Hi Madhurya,

    UWP notifications have multiple triggering methods, but in either case, the triggering results are processed within the application. Because UWP applications are sandboxed applications, in principle, the two applications are isolated.

    Can it be triggered from one app and be sent to another app?

    Can I understand that after clicking the notification from App1, open App2 to handle some things? If this is the case, it is not allowed. After clicking the notification from App1, App1 will be launched. You can create a trigger callback in App1 and launch App2 from App1, but you can't skip this step directly.

    ---

    If you need to communicate between two applications, I suggest you create an AppService to communicate between the two applications. Or create a web service as a data relay.

    Best regards.


    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.


    Thursday, September 26, 2019 11:45 AM
  • Thanks @Richasy.

    Actually I think I completely forgot to mention that the 2 apps will always be running in 2 devices.

    App1 will be used by certain set of users in some devices and App 2 will be used by another set of users in another set of devices.

    When a user of App1 does some action we need to notify the App2.

    We can assume always both the Apps will be running when that happens.

    For e.g. In a classroom the teacher is using App 1 and the students are using the App2, during the class when all of are using the App, teacher will send some notification to the student apps, so they need to get notified. But there won't be any option to send anything back. Just one way notification.

    Friday, September 27, 2019 10:04 AM
  • Hi,

    If so, you can consider using WebSocket to connect different devices to the target application, forming a small LAN, you can send information on the A device, then receive and pop up notifications from the B device.

    This is a sample document for WebSocket.

    This is a documentation about sockets, this technology should be able to meet your needs.

    Best regards.


    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.

    Friday, September 27, 2019 11:59 AM
  • Thanks @Richasy.

    I will read about sockets and see.

    On a quick question, what is the difference between a StreamSocket and StreamWebSocket ? (Should I ask this question separately?)

    Friday, September 27, 2019 12:10 PM
  • Hi,

    I've replied you in another thread. Please check that.

    Best regards,

    Roy


    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.

    Tuesday, October 1, 2019 5:52 AM
    Moderator
  • Hi,

    We are planning to use StreamSocket for the above task. (passing messages from one app to another app where the 2 apps will be in 2 different devices). So we'll create a Server (which listens for a connection) and a Client (which connects to the server).

    When we create a socket connection like that, can we send messages from the server to client and client to server both ways? or only from the server to client?

    If we create a connection like that, will it get timed out after a certain time? Does the Stream socket connection time out automatically or will last until we close it?

    If it doesn't time out and if we keep it running continuously, can that affect the battery life of tablets badly?

    Thanks

    Madhurya

    Saturday, November 16, 2019 10:49 AM