系统短信开发笔记 连心
原创
©著作权归作者所有:来自51CTO博客作者达达智能的原创作品,请联系作者获取转载授权,否则将追究法律责任
短信主界面:src/com/android/mms/ui/ConversationList.java
res/layout/conversation_list_screen.xml
短信主界面 listView Item 界面:res/layout/conversation_list_item.xml
发送界面 res/layout/compose_message_activity.xml
发送Activity : src/com/android/mms/ui/ComposeMessageActivity.java
发送按钮id:send_button_sms
发送代码的方法 :一下都是关联的
confirmSendMessageIfNeeded
sendMsimMessage(boolean bCheckEcmMode, int subscription)
sendMsimMessage(boolean bCheckEcmMode)
sendMessage(boolean bCheckEcmMode)
createGroupChatOrSendGroupChatMessage(String recipient)
RcsApiManager.getGroupChatApi().create(subject, users);
删除相关的信息:
ConversationList.java下:
Cursor cursor = mListAdapter.getCursor();
if (cursor != null && cursor.getPosition() >= 0) {
Conversation conv = Conversation.from(ConversationList.this, cursor);
long threadId = conv.getThreadId();
switch (item.getItemId()) {
case MENU_DELETE: {
confirmDeleteThread(threadId, mQueryHandler);
break;
}
case MENU_VIEW: {
openThread(threadId);
break;
}
MessageListItem.java 短信内容(是否是文字短信)
private void updateBodyTextView() {
if (mMessageItem.isMms() && mMessageItem.mLayoutType == LayoutModel.LAYOUT_TOP_TEXT) {
mBodyTextView = mBodyTopTextView;
} else {
mBodyTextView = mBodyButtomTextView;
}
if (!isRcsMessage() || mMessageItem.mRcsType == RcsUtils.RCS_MSG_TYPE_MAP) {
mBodyTextView.setVisibility(View.VISIBLE);
}
}public void saveDraft(final boolean isStopping) 这个方法是判断是否保存草稿箱
private void LaunchMsimDialog(final boolean bCheckEcmMode) 这个是判断选择哪一张卡