Xamarin 消息收件箱
Xamarin.iOS
Anchor link to- 将 Pushwoosh.Inbox.Xamarin.iOS Nuget 软件包添加到您的项目。
- 在您的项目中,打开 AppDelegate.cs 并通过添加
using Pushwoosh.Inbox行来连接 Pushwoosh.Inbox。 - 要在您的应用中显示 Inbox UI,请添加 Inbox 视图控制器:
NavigationController.PushViewController(PWIInboxUI.CreateInboxControllerWithStyle(PWIInboxStyle.DefaultStyle()), true);- 为了使 Inbox 看起来像是您应用的一部分,请更改 PWIInboxStyle 的参数。您可以自定义字体、背景颜色等参数。
PWIInboxStyle inboxStyle = PWIInboxStyle.CustomStyleWithDefaultImageIcon( UIImage.FromBundle("Default"), UIColor.DarkTextColor, UIColor.Blue, UIFont.SystemFontOfSize(17));inboxStyle.BackgroundColor = UIColor.White;inboxStyle.SelectionColor = UIColor.Orange;inboxStyle.ListErrorMessage = "Custom error message";inboxStyle.ListEmptyMessage = "Custom empty message";PWIInboxStyle.SetupDefaultStyle(inboxStyle);Xamarin.Android
Anchor link to- 将 Pushwoosh.Inbox.Xamarin.Android Nuget 软件包添加到您的项目。
- 通过添加以下行来连接 Pushwoosh.Inbox:
using Pushwoosh.Inbox;using Pushwoosh.Inbox.UI;using Pushwoosh.Inbox.UI.Activity;- 要在您的应用中显示 Inbox UI,请启动 InboxActivity:
Intent intent = new Intent(this, typeof(InboxActivity));StartActivity(intent);- 为了使 Inbox 看起来像是您应用的一部分,请更改 PushwooshInboxStyle 的参数。您可以自定义字体、背景颜色等参数。
PushwooshInboxStyle inboxStyle = PushwooshInboxStyle.Instance;inboxStyle.BackgroundColor = new Integer(Color.GhostWhite);inboxStyle.HighlightColor = new Integer(Color.ParseColor("#ff00ff"));inboxStyle.ListErrorMessage = "Custom error message";inboxStyle.ListEmptyText = "Custom empty message";inboxStyle.DefaultImageIcon = Resource.Drawable.inbox_message;与我们分享您的反馈
Anchor link to您的反馈有助于我们创造更好的体验,因此如果您在 SDK 集成过程中遇到任何问题,我们很乐意听取您的意见。如果您遇到任何困难,请随时 通过此表单 与我们分享您的想法。