Search code examples
c#windows-store-appswindows-8.1skypelockscreen

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


In win8.1, we can swipe down on lock screen to open camera. And also can answer a Skype call from the lock screen.

http://webwereld.nl/development/79224-skype-omzeilt-lockscreen-windows-8-1---update http://www.stckwt.com/index.php?route=product/product&product_id=137

I want to create a windows store App like Skype. When someone call, it will show a special toast : user can also choose how to respond – answer call or decline. If user choose answer call in lock screen, it will auto swipe down the screen and begin answer call.

But I have no idea.

Does anyone have similar experiences?


Solution

  • 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.

    Also the following blog goes over this as well: http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2013/09/27/windows-8-1-preview-and-alarm-call-applications.aspx