You can use six additional action plug-ins to enhance your mobile app messages: Display Web, Add to Calendar, Snooze, Email, Video, and Inbox Notifications.

You can use any of the plug-ins by adding the set of files for each plug-in and registering them. Each plug-in requires certain parameters.

Note: only Xamarin.Forms is supported.

Limitations of Xamarin on iOS

Due to memory limits in iOS Notification Service Extensions, Xamarin is unable to support multiple actions and media attachments.

Display Web plug-in

You can use the Display Web action plug-in to display a web page within an activity.
1. Add {package}/plugins/Actions/DisplayWeb/DisplayWeb.Forms.cs to the Forms project in Xamarin.
2. To register the action, add SDK.Instance.RegisterAction ("displayWebView", new WebViewAction ()); to the Forms project’s App Constructor.

Add to Calendar plug-in

The Add to Calendar plug-in allows a user to add an event to the calendar. This action happens in the background without opening the calendar.
1. Add {package}/plugins/Actions/Calandar/CalendarAction.Forms.cs to the Forms project in Xamarin.
2. Add {package}/plugins/Actions/Calandar/CalendarAction.iOS.cs to the iOS project in Xamarin.
3. Add {package}/plugins/Actions/Calandar/CalendarAction.Droid.cs to the Android project in Xamarin.
4. To register the action, add SDK.Instance.RegisterAction ("calendar", new CalendarAction ()); to the Forms project’s App Constructor.

Snooze plug-in

This plug-in contains the Snooze notification action. This action removes the notification from the notification bar and restores it after a number of minutes.
1. Add {package}/plugins/Actions/Snooze/SnoozeAction.Forms.cs to the Forms project in Xamarin.
2. Add {package}/plugins/Actions/Snooze/SnoozeAction.iOS.cs to the iOS project in Xamarin.
3. Add {package}/plugins/Actions/Snooze/SnoozeAction.Droid.cs to the Android project in Xamarin.
4. Add {package}/plugins/Actions/Snooze/SnoozeIntentService.cs to the Android project in Xamarin.
5. To register the action, add SDK.Instance.RegisterAction ("snooze", new SnoozeAction ()); to the Forms project’s App Constructor.

Tip: You should not have a single action as Snooze.

Email plug-in

This plug-in contains the email action. This action sends an email.
1. Add {package}/plugins/Actions/Email/EmailAction.Forms.cs to the Forms project in Xamarin.
2. Add {package}/plugins/Actions/Email/EmailAction.iOS.cs to the iOS project in Xamarin.
3. Add {package}/plugins/Actions/Email/EmailAction.Droid.cs to the Android project in Xamarin.
4. To register the action, add SDK.Instance.RegisterAction ("sendEmail", new EmailAction ()); to the Forms project’s App Constructor.

Video plug-in

You can use the Video action plug-in to display a video.
1. Add {package}/plugins/VideoPlayer/VideoPlayer.Forms.cs to the Forms project in Xamarin.
2. Add {package}/plugins/VideoPlayer/VideoPlayerRender.iOS.cs to the iOS project in Xamarin.
3. Add {package}/plugins/VideoPlayer/VideoPlayerRender.Droid.cs to the Android project in Xamarin.
4. Add {package}/plugins/VideoPlayer/VideoPlayerRenderer.xaml to the Android project’s Resources/layout directory.
5. Right-click VideoPlayerRenderer.xaml and then click properties.
6. Set Build Action to EmbeddedResource.
7. Set Custom tool to MSBuild:UpdateDesignTimeXaml.
8. Add {package}/plugins/VideoPlayer/play.png to the Android project’s Resources/drawable directory.
9. Create play.imageset in iOS project’s Resources/Images.xcassets folder.
10. Add {package}/plugins/VideoPlayer/play@1x.png to play.imageset for Universal 1x image.
11. Add {package}/plugins/VideoPlayer/play@2x.png to play.imageset for Universal 2x image.
12. Add {package}/plugins/VideoPlayer/play@3x.png to play.imageset for Universal 3x image.

Inbox Notifications plug-in

This plug-in contains the inbox notifications action. This action opens the inbox message.
1. Add {package}/plugins/Actions/Inbox/InboxAction.Forms.cs to the Forms project in Xamarin.
2. To register the action, add SDK.Instance.RegisterAction ("openInboxMessage", new InboxAction ()); to the project’s App Constructor.

Go Back to the Mobile App Messaging home page.

Join The Discussion

Your email address will not be published. Required fields are marked *