I am trying to create a new group channel from my fragment… please see this below code…
GroupChannelParams params = new GroupChannelParams()
.setPublic(false).setEphemeral(false)
.setDistinct(true).setSuper(false)
.addUserIds(users).setOperatorUserIds(operators);
GroupChannel.createChannel(params, new GroupChannel.GroupChannelCreateHandler() {
@Override
public void onResult(GroupChannel groupChannel, SendBirdException e) {
if (e != null) {
e.printStackTrace();
}
String channelUrl = groupChannel.getUrl();
/*Intent intent = new Intent(getActivity(), GroupChannelMainActivity.class);
intent.putExtra(PUSH_REDIRECT_CHANNEL, channelUrl);
startActivity(intent);*/
Intent intent = CustomChannelActivity.newIntentFromCustomActivity(getActivity(), CustomChannelActivity.class, channelUrl);
startActivity(intent);
getActivity().finish();
}
});
so this code is perfectly working if the android studio is in debug mode…but if the code is in Run, this throws an exception saying the user is not connected, Connection must be made.
any clue, why this code is not working in run mode, but success in debug mode…seems some delayed response causing problem…please help me