当前位置: 首页>>代码示例>>Java>>正文


Java Member类代码示例

本文整理汇总了Java中com.twilio.chat.Member的典型用法代码示例。如果您正苦于以下问题:Java Member类的具体用法?Java Member怎么用?Java Member使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Member类属于com.twilio.chat包,在下文中一共展示了Member类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: Member

import com.twilio.chat.Member; //导入依赖的package包/类
public static WritableMap Member(Member member) {
    WritableMap map = Arguments.createMap();

    map.putMap("userInfo", UserInfo(member.getUserInfo()));
    if (member.getLastConsumedMessageIndex() == null) {
        map.putNull("lastConsumedMessageIndex");
    }
    else {
        map.putInt("lastConsumedMessageIndex", member.getLastConsumedMessageIndex().intValue());
    }
    if (member.getLastConsumptionTimestamp() == null) {
        map.putNull("lastConsumptionTimestamp");
    }
    else {
        map.putString("lastConsumptionTimestamp", member.getLastConsumptionTimestamp());
    }

    return map;
}
 
开发者ID:ccm-innovation,项目名称:react-native-twilio-chat,代码行数:20,代码来源:RCTConvert.java

示例2: Paginator

import com.twilio.chat.Member; //导入依赖的package包/类
public static WritableMap Paginator(Object paginator, String sid, String type) {
    WritableMap map = Arguments.createMap();
    WritableMap _paginator = Arguments.createMap();
    switch (type) {
        case "Channel":
            _paginator.putArray("items", Channels(((Paginator<Channel>)paginator).getItems()));
            _paginator.putBoolean("hasNextPage", ((Paginator<Channel>)paginator).hasNextPage());
            break;
        case "ChannelDescriptor":
            _paginator.putArray("items", ChannelDescriptors(((Paginator<ChannelDescriptor>)paginator).getItems()));
            _paginator.putBoolean("hasNextPage", ((Paginator<ChannelDescriptor>)paginator).hasNextPage());
            break;
        case "Member":
            _paginator.putArray("items", Members(((Paginator<Member>)paginator).getItems()));
            _paginator.putBoolean("hasNextPage", ((Paginator<Member>)paginator).hasNextPage());
            break;
    }
    map.putString("sid", sid);
    map.putString("type", type);
    map.putMap("paginator", _paginator);
    return map;
}
 
开发者ID:ccm-innovation,项目名称:react-native-twilio-chat,代码行数:23,代码来源:RCTConvert.java

示例3: requestNextPageMembers

import com.twilio.chat.Member; //导入依赖的package包/类
public void requestNextPageMembers(String sid, final Promise promise) {
    final RCTTwilioChatPaginator tmp = RCTTwilioChatPaginator.getInstance();
    Paginator<Member> _paginator = (Paginator<Member>)tmp.paginators.get(sid);

    _paginator.requestNextPage(new CallbackListener<Paginator<Member>>() {
        @Override
        public void onError(ErrorInfo errorInfo) {
            super.onError(errorInfo);
            promise.reject("request-next-page", "Error occurred while attempting to request the next page. Error Message: " + errorInfo.getErrorText());
        }

        @Override
        public void onSuccess(Paginator<Member> paginator) {
            String uuid = RCTTwilioChatPaginator.setPaginator(paginator);
            promise.resolve(RCTConvert.Paginator(paginator, uuid, "Member"));
        }
    });
}
 
开发者ID:ccm-innovation,项目名称:react-native-twilio-chat,代码行数:19,代码来源:RCTTwilioChatPaginator.java

示例4: Members

import com.twilio.chat.Member; //导入依赖的package包/类
public static WritableArray Members(ArrayList<Member> members) {
    WritableArray array = Arguments.createArray();

    for (Member m : members) {
        array.pushMap(Member(m));
    }

    return array;
}
 
开发者ID:ccm-innovation,项目名称:react-native-twilio-chat,代码行数:10,代码来源:RCTConvert.java

示例5: onMemberJoin

import com.twilio.chat.Member; //导入依赖的package包/类
@Override
public void onMemberJoin(Member member) {
  StatusMessage statusMessage = new JoinedStatusMessage(member.getUserInfo().getIdentity());
  this.messageAdapter.addStatusMessage(statusMessage);
}
 
开发者ID:TwilioDevEd,项目名称:twiliochat-android,代码行数:6,代码来源:MainChatFragment.java

示例6: onMemberDelete

import com.twilio.chat.Member; //导入依赖的package包/类
@Override
public void onMemberDelete(Member member) {
  StatusMessage statusMessage = new LeftStatusMessage(member.getUserInfo().getIdentity());
  this.messageAdapter.addStatusMessage(statusMessage);
}
 
开发者ID:TwilioDevEd,项目名称:twiliochat-android,代码行数:6,代码来源:MainChatFragment.java

示例7: onMemberChange

import com.twilio.chat.Member; //导入依赖的package包/类
@Override
public void onMemberChange(Member member) {
}
 
开发者ID:TwilioDevEd,项目名称:twiliochat-android,代码行数:4,代码来源:MainChatFragment.java

示例8: onTypingStarted

import com.twilio.chat.Member; //导入依赖的package包/类
@Override
public void onTypingStarted(Member member) {
}
 
开发者ID:TwilioDevEd,项目名称:twiliochat-android,代码行数:4,代码来源:MainChatFragment.java

示例9: onTypingEnded

import com.twilio.chat.Member; //导入依赖的package包/类
@Override
public void onTypingEnded(Member member) {
}
 
开发者ID:TwilioDevEd,项目名称:twiliochat-android,代码行数:4,代码来源:MainChatFragment.java

示例10: onMemberAdded

import com.twilio.chat.Member; //导入依赖的package包/类
@Override
public void onMemberAdded(Member member) {
    Log.d(TAG, "Member added: " + member.getIdentity());
}
 
开发者ID:TwilioDevEd,项目名称:chat-quickstart-android,代码行数:5,代码来源:MainActivity.java

示例11: onMemberUpdated

import com.twilio.chat.Member; //导入依赖的package包/类
@Override
public void onMemberUpdated(Member member) {
    Log.d(TAG, "Member updated: " + member.getIdentity());
}
 
开发者ID:TwilioDevEd,项目名称:chat-quickstart-android,代码行数:5,代码来源:MainActivity.java

示例12: onMemberDeleted

import com.twilio.chat.Member; //导入依赖的package包/类
@Override
public void onMemberDeleted(Member member) {
    Log.d(TAG, "Member deleted: " + member.getIdentity());
}
 
开发者ID:TwilioDevEd,项目名称:chat-quickstart-android,代码行数:5,代码来源:MainActivity.java

示例13: onTypingStarted

import com.twilio.chat.Member; //导入依赖的package包/类
@Override
public void onTypingStarted(Member member) {
    Log.d(TAG, "Started Typing: " + member.getIdentity());
}
 
开发者ID:TwilioDevEd,项目名称:chat-quickstart-android,代码行数:5,代码来源:MainActivity.java

示例14: onTypingEnded

import com.twilio.chat.Member; //导入依赖的package包/类
@Override
public void onTypingEnded(Member member) {
    Log.d(TAG, "Ended Typing: " + member.getIdentity());
}
 
开发者ID:TwilioDevEd,项目名称:chat-quickstart-android,代码行数:5,代码来源:MainActivity.java


注:本文中的com.twilio.chat.Member类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。