public AndroidJavaObject ToAjo() { var notificationContentClass = new AndroidJavaClass("im.getsocial.sdk.pushnotifications.NotificationContent"); var notificationContent = notificationContentClass.CallStaticAJO("notificationWithText", _text) .CallAJO("withTitle", _title) .CallAJO("withTemplateName", _templateName) .CallAJO("addTemplatePlaceholders", _templatePlaceholders.ToJavaHashMap()) .CallAJO("addActionButtons", _actionButtons.ConvertAll(item => item.ToAjo()).ToJavaList()); if (_action != null) { notificationContent.CallAJO("withAction", _action.ToAjo()); } if (_mediaAttachment != null) { notificationContent.CallAJO("withMediaAttachment", _mediaAttachment.ToAjo()); } if (_customization != null) { notificationContent.CallAJO("withCustomization", _customization.ToAjo()); } if (_badge != null) { notificationContent.CallAJO("withBadge", _badge.ToAjo()); } return(notificationContent); }
public AndroidJavaObject ToAjo() { var activityPostContentBuilderAjo = new AndroidJavaObject("im.getsocial.sdk.activities.ActivityPostContent$Builder"); if (_text != null) { activityPostContentBuilderAjo.CallAJO("withText", _text); } if (_buttonTitle != null) { if (_buttonAction != null) { activityPostContentBuilderAjo.CallAJO("withButton", _buttonTitle, _buttonAction); } if (_action != null) { activityPostContentBuilderAjo.CallAJO("withButton", _buttonTitle, _action.ToAjo()); } } if (_mediaAttachment != null) { activityPostContentBuilderAjo.CallAJO("withMediaAttachment", _mediaAttachment.ToAjo()); } return(activityPostContentBuilderAjo.CallAJO("build")); }
public void ProcessAction(GetSocialAction notificationAction) { _getSocial.CallStatic("processAction", notificationAction.ToAjo()); }