protected override void OnActivityResult(int requestCode, Android.App.Result resultCode, Intent data) { base.OnActivityResult(requestCode, resultCode, data); if (requestCode == REQUEST_MESSAGING_CHANNEL_LIST) { if (resultCode == Android.App.Result.Ok && data != null) { SendBirdSDK.JoinMessaging(data.GetStringExtra("channelUrl")); } } else if (requestCode == REQUEST_MEMBER_LIST) { if (resultCode == Android.App.Result.Ok && data != null) { try { SendBirdSDK.InviteMessaging(SendBirdSDK.GetCurrentChannel().url, new List <string>(data.GetStringArrayExtra("userIds"))); } catch (Exception e) { Console.WriteLine(e.StackTrace); } } } }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); // Set our view from the "main" layout resource SetContentView(Resource.Layout.SendBirdActivityMessaging); this.Window.SetSoftInputMode(SoftInput.StateAlwaysHidden); InitFragment(savedInstanceState); InitUIComponents(); InitSendBird(this.Intent.Extras); if (mSendBirdInfo.GetBoolean("start")) { string[] targetUserIds = mSendBirdInfo.GetStringArray("targetUserIds"); SendBirdSDK.StartMessaging(new List <string> (targetUserIds)); } else if (mSendBirdInfo.GetBoolean("join")) { string channelUrl = mSendBirdInfo.GetString("channelUrl"); SendBirdSDK.JoinMessaging(channelUrl); } }
public void JoinMessaging(string channelUrl) { ResetMessagingContent(); InitMessaging(); SendBirdSDK.JoinMessaging(channelUrl); }