From 9fb2ce92971f55991201c5302a2da87d7856f5c2 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 11 Apr 2019 15:50:51 -0400 Subject: [PATCH] mobile messaging service --- src/App/Services/MobileMessagingService.cs | 12 ++++++++++++ src/Core/Abstractions/IMessagingService.cs | 7 +++++++ 2 files changed, 19 insertions(+) create mode 100644 src/App/Services/MobileMessagingService.cs create mode 100644 src/Core/Abstractions/IMessagingService.cs diff --git a/src/App/Services/MobileMessagingService.cs b/src/App/Services/MobileMessagingService.cs new file mode 100644 index 000000000..b1faf6c1f --- /dev/null +++ b/src/App/Services/MobileMessagingService.cs @@ -0,0 +1,12 @@ +using Bit.Core.Abstractions; + +namespace Bit.App.Services +{ + public class MobileMessagingService : IMessagingService + { + public void Send(string subscriber, object arg = null) + { + Xamarin.Forms.MessagingCenter.Send(Xamarin.Forms.Application.Current, subscriber, arg); + } + } +} diff --git a/src/Core/Abstractions/IMessagingService.cs b/src/Core/Abstractions/IMessagingService.cs new file mode 100644 index 000000000..08d631907 --- /dev/null +++ b/src/Core/Abstractions/IMessagingService.cs @@ -0,0 +1,7 @@ +namespace Bit.Core.Abstractions +{ + public interface IMessagingService + { + void Send(string subscriber, object arg = null); + } +} \ No newline at end of file