Commit 976c8fd9 authored by Sylvain Berfini's avatar Sylvain Berfini

Vibrate 1sec when chat message is received

parent 71f35bd6
......@@ -16,6 +16,7 @@ using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls.Primitives;
using System.Xml.Linq;
using Windows.Phone.Devices.Notification;
using Windows.Phone.Media.Capture;
using Windows.Phone.Media.Devices;
using Windows.Phone.Networking.Voip;
......@@ -776,6 +777,10 @@ namespace Linphone.Model
string sipAddress = message.GetFrom().AsStringUriOnly().Replace("sip:", "");
Logger.Msg("[LinphoneManager] Message received from " + sipAddress + ": " + message.GetText());
//Vibrate
VibrationDevice vibrator = VibrationDevice.GetDefault();
vibrator.Vibrate(TimeSpan.FromSeconds(1));
if (MessageListener != null && MessageListener.GetSipAddressAssociatedWithDisplayConversation() != null && MessageListener.GetSipAddressAssociatedWithDisplayConversation().Equals(sipAddress))
{
MessageListener.MessageReceived(message);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment