當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。