locked
How to create the special toast and swipe down on lock screen like Skype in win8.1?

Answers

  • The Alarm Toast Notification sample shows how to do this for an application that is the Alarm application for the machine:

    https://code.msdn.microsoft.com/windowsapps/Alarm-toast-notifications-fe81fc74

    If your application is a VOIP application then you can modify the toast XML String in that sample to be the following:

                        string toastXmlString =
                        "<toast duration=\"long\">\n" +
                            "<visual>\n" +
                                "<binding template=\"ToastText02\">\n" +
                                    "<text id=\"1\">Alarms Notifications SDK Sample App</text>\n" +
                                    "<text id=\"2\">" + alarmName + "</text>\n" +
                                "</binding>\n" +
                            "</visual>\n" +
                            "<commands scenario=\"incomingCall\">\n" +
                                "<command id=\"voice\"/>\n" +
                                "<command id=\"video\"/>\n" +
                                "<command id=\"decline\"/>\n" +
                            "</commands>\n" +
                            "<audio src=\"ms-winsoundevent:Notification.Looping.Alarm2\" loop=\"true\" />\n" +
                        "</toast>\n";


    Note that this will only work if you have an application that can accept incoming calls.


    Bret Bentzinger (MSFT) @awehellyeah

    • Marked as answer by hatasum Tuesday, March 17, 2015 7:51 AM
    Tuesday, March 10, 2015 11:17 PM
    Moderator
  • http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2013/09/27/windows-8-1-preview-and-alarm-call-applications.aspx

    The link answer all my question, thanks for everyone's help!

    Wednesday, March 11, 2015 4:51 AM

All replies

  • The Alarm Toast Notification sample shows how to do this for an application that is the Alarm application for the machine:

    https://code.msdn.microsoft.com/windowsapps/Alarm-toast-notifications-fe81fc74

    If your application is a VOIP application then you can modify the toast XML String in that sample to be the following:

                        string toastXmlString =
                        "<toast duration=\"long\">\n" +
                            "<visual>\n" +
                                "<binding template=\"ToastText02\">\n" +
                                    "<text id=\"1\">Alarms Notifications SDK Sample App</text>\n" +
                                    "<text id=\"2\">" + alarmName + "</text>\n" +
                                "</binding>\n" +
                            "</visual>\n" +
                            "<commands scenario=\"incomingCall\">\n" +
                                "<command id=\"voice\"/>\n" +
                                "<command id=\"video\"/>\n" +
                                "<command id=\"decline\"/>\n" +
                            "</commands>\n" +
                            "<audio src=\"ms-winsoundevent:Notification.Looping.Alarm2\" loop=\"true\" />\n" +
                        "</toast>\n";


    Note that this will only work if you have an application that can accept incoming calls.


    Bret Bentzinger (MSFT) @awehellyeah

    • Marked as answer by hatasum Tuesday, March 17, 2015 7:51 AM
    Tuesday, March 10, 2015 11:17 PM
    Moderator
  • http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2013/09/27/windows-8-1-preview-and-alarm-call-applications.aspx

    The link answer all my question, thanks for everyone's help!

    Wednesday, March 11, 2015 4:51 AM