├── IMServer ├── README.md ├── STNetMsgXpHeader.h ├── query.proto └── CMakeLists.txt ├── IMApiServer ├── README.md ├── CMakeLists.txt └── CJsonObjectBase.h ├── WechatBySimple ├── app │ ├── .gitignore │ ├── src │ │ ├── main │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── simple │ │ │ │ │ └── wechatsimple │ │ │ │ │ ├── util │ │ │ │ │ ├── ParamsUtil.java │ │ │ │ │ ├── IAudioState.java │ │ │ │ │ ├── AudioStateMessage.java │ │ │ │ │ ├── AppCompatActivityExt.kt │ │ │ │ │ ├── MD5.java │ │ │ │ │ ├── GsonUtil.java │ │ │ │ │ ├── IAudioRecordListener.java │ │ │ │ │ ├── EditTextBySimple.java │ │ │ │ │ ├── ListBindingsUtil.kt │ │ │ │ │ ├── DisplayUtil.java │ │ │ │ │ ├── ImageViewAttrBindings.kt │ │ │ │ │ ├── FileUtil.java │ │ │ │ │ └── ViewModelFactory.kt │ │ │ │ │ ├── model │ │ │ │ │ ├── action │ │ │ │ │ │ ├── LogOutAction.java │ │ │ │ │ │ ├── LongLinkStatusActionModel.java │ │ │ │ │ │ └── RefreshUnreadCountModel.java │ │ │ │ │ ├── databse │ │ │ │ │ │ ├── LoginStateModel.java │ │ │ │ │ │ ├── UnreadCountModel.java │ │ │ │ │ │ ├── UnreadMessageRecordModel.java │ │ │ │ │ │ ├── ConversationModel.java │ │ │ │ │ │ └── UserModel.java │ │ │ │ │ ├── ImageMessageItemModel.java │ │ │ │ │ ├── TextMessageItemModel.java │ │ │ │ │ ├── VoiceMessageItemModel.java │ │ │ │ │ ├── ConversationItemModel.java │ │ │ │ │ └── ContactItemModel.java │ │ │ │ │ ├── base │ │ │ │ │ ├── IBaseBindingAdapterItem.java │ │ │ │ │ ├── BaseModelView.kt │ │ │ │ │ ├── BaseBindRecyclerViewAdapter.java │ │ │ │ │ ├── SingleLiveEvent.kt │ │ │ │ │ ├── BaseFragment.kt │ │ │ │ │ ├── BaseActivity.kt │ │ │ │ │ └── BaseBindingAdapter.java │ │ │ │ │ ├── data │ │ │ │ │ └── source │ │ │ │ │ │ ├── remote │ │ │ │ │ │ └── network │ │ │ │ │ │ │ ├── BaseRequestBodyEntity.kt │ │ │ │ │ │ │ ├── BaseResponseBodyEntity.kt │ │ │ │ │ │ │ ├── NetworkApi.kt │ │ │ │ │ │ │ └── Network.kt │ │ │ │ │ │ ├── excutor │ │ │ │ │ │ ├── DiskIOThreadExecutor.kt │ │ │ │ │ │ └── AppExecutors.kt │ │ │ │ │ │ ├── DataSource.kt │ │ │ │ │ │ ├── inject │ │ │ │ │ │ └── Injection.kt │ │ │ │ │ │ ├── local │ │ │ │ │ │ └── LocalDataSource.kt │ │ │ │ │ │ └── DataSourceRepository.kt │ │ │ │ │ ├── discovery │ │ │ │ │ └── DiscoveryFragment.kt │ │ │ │ │ ├── main │ │ │ │ │ └── TabEntity.java │ │ │ │ │ ├── login │ │ │ │ │ └── LoginActivity.kt │ │ │ │ │ ├── recent │ │ │ │ │ ├── RecentFragment.kt │ │ │ │ │ └── RecentMessageAdapter.kt │ │ │ │ │ └── contacts │ │ │ │ │ └── ContactAdapter.kt │ │ │ └── res │ │ │ │ ├── drawable │ │ │ │ ├── holder.png │ │ │ │ ├── loading.png │ │ │ │ ├── bg_voice_popup.9.png │ │ │ │ ├── img_bubble_send.9.png │ │ │ │ ├── img_bubble_receive.9.png │ │ │ │ ├── portrait_placeholder.jpg │ │ │ │ ├── wechat_notification.png │ │ │ │ ├── shape_solid_e5e5e5.xml │ │ │ │ ├── shape_red_dot.xml │ │ │ │ ├── corner_voice_style.xml │ │ │ │ ├── shape_solid_ffffff.xml │ │ │ │ ├── shape_session_btn_send.xml │ │ │ │ ├── shape_vertical_line.xml │ │ │ │ ├── shape_solid_51aa37_radius_5.xml │ │ │ │ ├── selector_login_btn.xml │ │ │ │ ├── alertdialog_left_selector.xml │ │ │ │ ├── alertdialog_right_selector.xml │ │ │ │ ├── alertdialog_single_selector.xml │ │ │ │ ├── progress_loading.xml │ │ │ │ ├── shape_notification_bg.xml │ │ │ │ ├── actionsheet_top_selector.xml │ │ │ │ ├── actionsheet_bottom_selector.xml │ │ │ │ ├── actionsheet_middle_selector.xml │ │ │ │ ├── actionsheet_single_selector.xml │ │ │ │ ├── selector_common_item.xml │ │ │ │ ├── selector_edit_focus.xml │ │ │ │ ├── shape_bottom_gray.xml │ │ │ │ ├── shape_session_func_press_bg.xml │ │ │ │ ├── shape_bottom_green.xml │ │ │ │ ├── shape_session_func_normal_bg.xml │ │ │ │ ├── shape_stroke_9ec697_solid_b0dca8_radius_5.xml │ │ │ │ ├── shape_session_btn_voice_normal.xml │ │ │ │ ├── sidebar_background.xml │ │ │ │ ├── shape_horizontal_line.xml │ │ │ │ ├── selector_session_func.xml │ │ │ │ ├── checkbox_style.xml │ │ │ │ ├── audio_animation_left_list.xml │ │ │ │ └── audio_animation_right_list.xml │ │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_add.png │ │ │ │ ├── ic_ppt.png │ │ │ │ ├── ic_tag.png │ │ │ │ ├── ic_zip.png │ │ │ │ ├── splash.jpg │ │ │ │ ├── bg_unread.png │ │ │ │ ├── ic_back.png │ │ │ │ ├── ic_delete.png │ │ │ │ ├── ic_excel.png │ │ │ │ ├── ic_file.png │ │ │ │ ├── ic_game.png │ │ │ │ ├── ic_radar.png │ │ │ │ ├── ic_scan.png │ │ │ │ ├── ic_search.png │ │ │ │ ├── ic_word.png │ │ │ │ ├── img_error.png │ │ │ │ ├── me_normal.png │ │ │ │ ├── me_press.png │ │ │ │ ├── avatar_def.png │ │ │ │ ├── default_img.png │ │ │ │ ├── ic_computer.png │ │ │ │ ├── ic_exit_app.png │ │ │ │ ├── ic_func_pic.png │ │ │ │ ├── ic_huanlin.png │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_offical.png │ │ │ │ ├── ic_qr_code.png │ │ │ │ ├── ic_question.png │ │ │ │ ├── ic_search1.png │ │ │ │ ├── ic_search2.png │ │ │ │ ├── ic_search3.png │ │ │ │ ├── ic_see_pwd.png │ │ │ │ ├── ic_shop_red.png │ │ │ │ ├── ic_volume_0.png │ │ │ │ ├── ic_volume_1.png │ │ │ │ ├── ic_volume_2.png │ │ │ │ ├── ic_volume_3.png │ │ │ │ ├── ic_volume_4.png │ │ │ │ ├── ic_volume_5.png │ │ │ │ ├── ic_volume_6.png │ │ │ │ ├── ic_volume_7.png │ │ │ │ ├── ic_volume_8.png │ │ │ │ ├── img_weixin.png │ │ │ │ ├── rainbow_ic.png │ │ │ │ ├── _bg_to_hongbao.png │ │ │ │ ├── btn_location.png │ │ │ │ ├── contacts_press.png │ │ │ │ ├── default_header.jpg │ │ │ │ ├── ic_add_friend.png │ │ │ │ ├── ic_around_blue.png │ │ │ │ ├── ic_card_pack.png │ │ │ │ ├── ic_card_pack1.png │ │ │ │ ├── ic_cheat_add.png │ │ │ │ ├── ic_cheat_emo.png │ │ │ │ ├── ic_cheat_voice.png │ │ │ │ ├── ic_emo_yellow.png │ │ │ │ ├── ic_friend_male.png │ │ │ │ ├── ic_friend_more.png │ │ │ │ ├── ic_func_record.png │ │ │ │ ├── ic_func_shot.png │ │ │ │ ├── ic_func_video.png │ │ │ │ ├── ic_func_voice.png │ │ │ │ ├── ic_gender_male.png │ │ │ │ ├── ic_group_cheat.png │ │ │ │ ├── ic_new_friend.png │ │ │ │ ├── ic_photo_blue.png │ │ │ │ ├── ic_photo_blue1.png │ │ │ │ ├── ic_scan_blue.png │ │ │ │ ├── ic_scan_white.png │ │ │ │ ├── ic_sellection.png │ │ │ │ ├── ic_sellection1.png │ │ │ │ ├── ic_shake_blue.png │ │ │ │ ├── ic_wallet_blue.png │ │ │ │ ├── list_selected.png │ │ │ │ ├── message_normal.png │ │ │ │ ├── message_press.png │ │ │ │ ├── _bg_from_hongbao.png │ │ │ │ ├── contacts_normal.png │ │ │ │ ├── default_location.png │ │ │ │ ├── discovery_normal.png │ │ │ │ ├── discovery_press.png │ │ │ │ ├── ic_delete_white.png │ │ │ │ ├── ic_exit_account.png │ │ │ │ ├── ic_friend_circle.png │ │ │ │ ├── ic_friend_delete.png │ │ │ │ ├── ic_friend_female.png │ │ │ │ ├── ic_friend_forbid.png │ │ │ │ ├── ic_friend_remark.png │ │ │ │ ├── ic_friend_share.png │ │ │ │ ├── ic_friend_start.png │ │ │ │ ├── ic_func_location.png │ │ │ │ ├── ic_func_red_pack.png │ │ │ │ ├── ic_func_transfer.png │ │ │ │ ├── ic_gender_female.png │ │ │ │ ├── ic_help_feedback.png │ │ │ │ ├── ic_session_info.png │ │ │ │ ├── ic_setting_blue.png │ │ │ │ ├── ic_volume_cancel.png │ │ │ │ ├── ic_wallet_blue1.png │ │ │ │ ├── img_weixin_small.png │ │ │ │ ├── list_unselected.png │ │ │ │ ├── default_img_failed.png │ │ │ │ ├── ic_add_team_member.png │ │ │ │ ├── ic_cheat_keyboard.png │ │ │ │ ├── ic_friend_complain.png │ │ │ │ ├── ic_func_collectioin.png │ │ │ │ ├── ic_func_red_packet.png │ │ │ │ ├── ic_payment_received.png │ │ │ │ ├── ic_sound_tip_close.png │ │ │ │ ├── ic_sound_tip_open.png │ │ │ │ ├── ic_volume_wraning.png │ │ │ │ ├── img_video_default.png │ │ │ │ ├── audio_animation_left.png │ │ │ │ ├── audio_animation_right.png │ │ │ │ ├── ic_create_group_cheat.png │ │ │ │ ├── ic_file_wall_del_gray.png │ │ │ │ ├── ic_friend_circle_gray.png │ │ │ │ ├── ic_friend_search_gray.png │ │ │ │ ├── ic_friend_to_desktop.png │ │ │ │ ├── ic_func_business_card.png │ │ │ │ ├── ic_remove_team_member.png │ │ │ │ ├── ic_file_wall_del_white.png │ │ │ │ ├── ic_file_wall_share_gray.png │ │ │ │ ├── ic_file_wall_share_white.png │ │ │ │ ├── ic_friend_search_green.png │ │ │ │ ├── img_video_play_session.png │ │ │ │ ├── ic_file_wall_collect_gray.png │ │ │ │ ├── ic_file_wall_collect_white.png │ │ │ │ ├── ic_player_mode_video_wall.png │ │ │ │ ├── nim_image_download_failed.jpg │ │ │ │ ├── audio_animation_list_left_1.png │ │ │ │ ├── audio_animation_list_left_2.png │ │ │ │ ├── audio_animation_list_left_3.png │ │ │ │ ├── audio_animation_list_right_1.png │ │ │ │ ├── audio_animation_list_right_2.png │ │ │ │ └── audio_animation_list_right_3.png │ │ │ │ ├── drawable-hdpi │ │ │ │ ├── trans_bg.png │ │ │ │ ├── alert_bg.9.png │ │ │ │ ├── actionsheet_top_normal.9.png │ │ │ │ ├── actionsheet_top_pressed.9.png │ │ │ │ ├── alert_btn_left_pressed.9.png │ │ │ │ ├── alert_btn_right_pressed.9.png │ │ │ │ ├── actionsheet_bottom_normal.9.png │ │ │ │ ├── actionsheet_bottom_pressed.9.png │ │ │ │ ├── actionsheet_middle_normal.9.png │ │ │ │ ├── actionsheet_middle_pressed.9.png │ │ │ │ ├── actionsheet_single_normal.9.png │ │ │ │ ├── actionsheet_single_pressed.9.png │ │ │ │ └── alert_btn_single_pressed.9.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_back.png │ │ │ │ ├── me_press.png │ │ │ │ ├── splash.jpg │ │ │ │ ├── me_normal.png │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── message_press.png │ │ │ │ ├── contacts_normal.png │ │ │ │ ├── contacts_press.png │ │ │ │ ├── discovery_press.png │ │ │ │ ├── message_normal.png │ │ │ │ ├── checkbox_checked.png │ │ │ │ ├── discovery_normal.png │ │ │ │ ├── wechat_notification.png │ │ │ │ ├── checkbox_normal_black.png │ │ │ │ ├── checkbox_normal_white.png │ │ │ │ └── checkbox_checked_disable.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── xml │ │ │ │ └── network_security_config.xml │ │ │ │ ├── anim │ │ │ │ ├── actionsheet_dialog_in.xml │ │ │ │ ├── actionsheet_dialog_out.xml │ │ │ │ ├── slide_left_in.xml │ │ │ │ ├── slide_left_out.xml │ │ │ │ ├── slide_right_in.xml │ │ │ │ └── slide_right_out.xml │ │ │ │ ├── layout │ │ │ │ ├── act_splash.xml │ │ │ │ ├── act_login.xml │ │ │ │ ├── act_session.xml │ │ │ │ ├── fragment_recent_message.xml │ │ │ │ ├── act_main.xml │ │ │ │ ├── item_notification.xml │ │ │ │ ├── frag_contacts.xml │ │ │ │ ├── item_no_support_msg_type.xml │ │ │ │ └── view_actionsheet.xml │ │ │ │ └── values │ │ │ │ └── dimens.xml │ │ ├── test │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── simple │ │ │ │ └── wechatsimple │ │ │ │ └── ExampleUnitTest.kt │ │ └── androidTest │ │ │ └── java │ │ │ └── com │ │ │ └── simple │ │ │ └── wechatsimple │ │ │ └── ExampleInstrumentedTest.kt │ └── proguard-rules.pro ├── imlib │ ├── .gitignore │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ └── values │ │ │ │ │ └── strings.xml │ │ │ ├── AndroidManifest.xml │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── simple │ │ │ │ └── imlib │ │ │ │ ├── listener │ │ │ │ ├── ITaskWrapperListener.kt │ │ │ │ ├── IUploadVoiceListener.kt │ │ │ │ ├── ISendTextMessageListener.kt │ │ │ │ ├── IUploadImageListener.kt │ │ │ │ └── IUploadServiceListener.kt │ │ │ │ ├── handler │ │ │ │ ├── BusinessHandler.java │ │ │ │ ├── LogOutMessageHandler.java │ │ │ │ └── MessageHandler.java │ │ │ │ ├── constant │ │ │ │ └── Constant.kt │ │ │ │ └── task │ │ │ │ └── HistoryTaskWrapper.java │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── simple │ │ │ └── imlib │ │ │ └── ExampleUnitTest.java │ ├── proguard-rules.pro │ └── build.gradle ├── README.md ├── wrapper │ ├── .gitignore │ ├── src │ │ └── main │ │ │ ├── res │ │ │ └── values │ │ │ │ └── strings.xml │ │ │ ├── jniLibs │ │ │ ├── x86_64 │ │ │ │ ├── libmarsstn.so │ │ │ │ ├── libmarsxlog.so │ │ │ │ └── libstlport_shared.so │ │ │ ├── arm64-v8a │ │ │ │ ├── libmarsstn.so │ │ │ │ ├── libmarsxlog.so │ │ │ │ └── libstlport_shared.so │ │ │ └── armeabi-v7a │ │ │ │ ├── libmarsstn.so │ │ │ │ ├── libmarsxlog.so │ │ │ │ └── libstlport_shared.so │ │ │ ├── java │ │ │ └── com │ │ │ │ └── tencent │ │ │ │ └── mars │ │ │ │ ├── wrapper │ │ │ │ ├── remote │ │ │ │ │ ├── ConnectInfoHandler.java │ │ │ │ │ ├── PushMessageHandler.java │ │ │ │ │ ├── PackageUtils.java │ │ │ │ │ ├── PushMessage.java │ │ │ │ │ └── MarsTaskProperty.java │ │ │ │ ├── service │ │ │ │ │ ├── MarsServiceProfileFactory.java │ │ │ │ │ ├── MarsServiceProfile.java │ │ │ │ │ └── DebugMarsServiceProfile.java │ │ │ │ ├── task │ │ │ │ │ └── LoginTaskWrapper.java │ │ │ │ └── TaskProperty.java │ │ │ │ └── utils │ │ │ │ └── print │ │ │ │ ├── BaseConstants.java │ │ │ │ ├── BundleFormat.java │ │ │ │ └── MemoryDump.java │ │ │ ├── aidl │ │ │ └── com │ │ │ │ └── tencent │ │ │ │ └── mars │ │ │ │ └── wrapper │ │ │ │ └── remote │ │ │ │ ├── MarsPushMessageFilter.aidl │ │ │ │ ├── MarsReportConnectInfo.aidl │ │ │ │ ├── MarsTaskWrapper.aidl │ │ │ │ └── MarsService.aidl │ │ │ ├── cpp │ │ │ ├── muduo │ │ │ │ ├── copyable.h │ │ │ │ ├── Buffer.cc │ │ │ │ └── Endian.h │ │ │ └── parse.h │ │ │ ├── AndroidManifest.xml │ │ │ └── proto │ │ │ └── query.proto │ ├── gradle.properties │ ├── proguard-rules.pro │ ├── CMakeLists.txt │ └── build.gradle ├── uploadservice │ ├── .gitignore │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ └── values │ │ │ │ │ └── strings.xml │ │ │ ├── aidl │ │ │ │ └── com │ │ │ │ │ └── simple │ │ │ │ │ └── upload │ │ │ │ │ ├── UploadInfo.aidl │ │ │ │ │ ├── ServerResponse.aidl │ │ │ │ │ ├── FTPUploadTaskParameters.aidl │ │ │ │ │ ├── IUploadInterface.aidl │ │ │ │ │ └── UploadStatusDelegate.aidl │ │ │ ├── AndroidManifest.xml │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── simple │ │ │ │ └── upload │ │ │ │ ├── schemehandlers │ │ │ │ ├── SchemeHandler.java │ │ │ │ ├── FileSchemeHandler.java │ │ │ │ └── SchemeHandlerFactory.java │ │ │ │ ├── DefaultLoggerDelegate.java │ │ │ │ └── UploadTaskParameters.java │ │ ├── test │ │ │ └── java │ │ │ │ └── net │ │ │ │ └── gotev │ │ │ │ └── uploadservice │ │ │ │ └── ExampleUnitTest.java │ │ └── androidTest │ │ │ └── java │ │ │ └── net │ │ │ └── gotev │ │ │ └── uploadservice │ │ │ └── ExampleInstrumentedTest.java │ ├── build.gradle │ └── proguard-rules.pro ├── settings.gradle ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── .gitignore ├── gradle.properties └── build.gradle └── README.md /IMServer/README.md: -------------------------------------------------------------------------------- 1 | #IMServer 2 | -------------------------------------------------------------------------------- /IMApiServer/README.md: -------------------------------------------------------------------------------- 1 | #IMApiServer 2 | -------------------------------------------------------------------------------- /WechatBySimple/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /WechatBySimple/imlib/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /WechatBySimple/README.md: -------------------------------------------------------------------------------- 1 | #WechatBySimple 2 | -------------------------------------------------------------------------------- /WechatBySimple/wrapper/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /WechatBySimple/uploadservice/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /WechatBySimple/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':wrapper', ':uploadservice', ':imlib' 2 | -------------------------------------------------------------------------------- /WechatBySimple/imlib/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | IMLib 3 | 4 | -------------------------------------------------------------------------------- /WechatBySimple/uploadservice/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | UploadService 3 | 4 | -------------------------------------------------------------------------------- /WechatBySimple/wrapper/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | wrapper_for_android 3 | 4 | -------------------------------------------------------------------------------- /WechatBySimple/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /WechatBySimple/uploadservice/src/main/aidl/com/simple/upload/UploadInfo.aidl: -------------------------------------------------------------------------------- 1 | // UploadInfo.aidl 2 | package com.simple.upload; 3 | 4 | parcelable UploadInfo; -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/util/ParamsUtil.java: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.util; 2 | 3 | public class ParamsUtil { 4 | } 5 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable/holder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/drawable/holder.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable/loading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/drawable/loading.png -------------------------------------------------------------------------------- /WechatBySimple/imlib/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_add.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_ppt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_ppt.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_tag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_tag.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_zip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_zip.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/splash.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/splash.jpg -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable-hdpi/trans_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/drawable-hdpi/trans_bg.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/bg_unread.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/bg_unread.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_back.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_delete.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_excel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_excel.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_file.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_game.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_game.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_radar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_radar.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_scan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_scan.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_search.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_word.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_word.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/img_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/img_error.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/me_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/me_normal.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/me_press.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/me_press.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xxhdpi/ic_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xxhdpi/ic_back.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xxhdpi/me_press.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xxhdpi/me_press.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xxhdpi/splash.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xxhdpi/splash.jpg -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable-hdpi/alert_bg.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/drawable-hdpi/alert_bg.9.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/avatar_def.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/avatar_def.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/default_img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/default_img.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_computer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_computer.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_exit_app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_exit_app.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_func_pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_func_pic.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_huanlin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_huanlin.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_offical.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_offical.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_qr_code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_qr_code.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_question.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_question.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_search1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_search1.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_search2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_search2.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_search3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_search3.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_see_pwd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_see_pwd.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_shop_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_shop_red.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_volume_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_volume_0.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_volume_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_volume_1.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_volume_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_volume_2.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_volume_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_volume_3.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_volume_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_volume_4.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_volume_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_volume_5.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_volume_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_volume_6.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_volume_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_volume_7.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_volume_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_volume_8.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/img_weixin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/img_weixin.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/rainbow_ic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/rainbow_ic.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xxhdpi/me_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xxhdpi/me_normal.png -------------------------------------------------------------------------------- /WechatBySimple/uploadservice/src/main/aidl/com/simple/upload/ServerResponse.aidl: -------------------------------------------------------------------------------- 1 | // IMyAidlInterface.aidl 2 | package com.simple.upload; 3 | 4 | parcelable ServerResponse; 5 | -------------------------------------------------------------------------------- /WechatBySimple/wrapper/src/main/jniLibs/x86_64/libmarsstn.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/wrapper/src/main/jniLibs/x86_64/libmarsstn.so -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/model/action/LogOutAction.java: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.model.action; 2 | 3 | public class LogOutAction { 4 | } 5 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable/bg_voice_popup.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/drawable/bg_voice_popup.9.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable/img_bubble_send.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/drawable/img_bubble_send.9.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/_bg_to_hongbao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/_bg_to_hongbao.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/btn_location.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/btn_location.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/contacts_press.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/contacts_press.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/default_header.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/default_header.jpg -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_add_friend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_add_friend.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_around_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_around_blue.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_card_pack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_card_pack.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_card_pack1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_card_pack1.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_cheat_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_cheat_add.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_cheat_emo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_cheat_emo.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_cheat_voice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_cheat_voice.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_emo_yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_emo_yellow.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_friend_male.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_friend_male.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_friend_more.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_friend_more.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_func_record.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_func_record.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_func_shot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_func_shot.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_func_video.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_func_video.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_func_voice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_func_voice.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_gender_male.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_gender_male.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_group_cheat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_group_cheat.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_new_friend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_new_friend.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_photo_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_photo_blue.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_photo_blue1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_photo_blue1.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_scan_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_scan_blue.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_scan_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_scan_white.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_sellection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_sellection.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_sellection1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_sellection1.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_shake_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_shake_blue.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_wallet_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_wallet_blue.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/list_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/list_selected.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/message_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/message_normal.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/message_press.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/message_press.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xxhdpi/message_press.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xxhdpi/message_press.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /WechatBySimple/wrapper/src/main/jniLibs/arm64-v8a/libmarsstn.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/wrapper/src/main/jniLibs/arm64-v8a/libmarsstn.so -------------------------------------------------------------------------------- /WechatBySimple/wrapper/src/main/jniLibs/x86_64/libmarsxlog.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/wrapper/src/main/jniLibs/x86_64/libmarsxlog.so -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable/img_bubble_receive.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/drawable/img_bubble_receive.9.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable/portrait_placeholder.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/drawable/portrait_placeholder.jpg -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable/wechat_notification.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/drawable/wechat_notification.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/_bg_from_hongbao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/_bg_from_hongbao.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/contacts_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/contacts_normal.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/default_location.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/default_location.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/discovery_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/discovery_normal.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/discovery_press.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/discovery_press.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_delete_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_delete_white.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_exit_account.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_exit_account.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_friend_circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_friend_circle.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_friend_delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_friend_delete.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_friend_female.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_friend_female.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_friend_forbid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_friend_forbid.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_friend_remark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_friend_remark.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_friend_share.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_friend_share.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_friend_start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_friend_start.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_func_location.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_func_location.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_func_red_pack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_func_red_pack.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_func_transfer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_func_transfer.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_gender_female.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_gender_female.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_help_feedback.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_help_feedback.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_session_info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_session_info.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_setting_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_setting_blue.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_volume_cancel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_volume_cancel.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_wallet_blue1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_wallet_blue1.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/img_weixin_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/img_weixin_small.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/list_unselected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/list_unselected.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xxhdpi/contacts_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xxhdpi/contacts_normal.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xxhdpi/contacts_press.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xxhdpi/contacts_press.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xxhdpi/discovery_press.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xxhdpi/discovery_press.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xxhdpi/message_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xxhdpi/message_normal.png -------------------------------------------------------------------------------- /WechatBySimple/wrapper/src/main/jniLibs/arm64-v8a/libmarsxlog.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/wrapper/src/main/jniLibs/arm64-v8a/libmarsxlog.so -------------------------------------------------------------------------------- /WechatBySimple/wrapper/src/main/jniLibs/armeabi-v7a/libmarsstn.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/wrapper/src/main/jniLibs/armeabi-v7a/libmarsstn.so -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/default_img_failed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/default_img_failed.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_add_team_member.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_add_team_member.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_cheat_keyboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_cheat_keyboard.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_friend_complain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_friend_complain.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_func_collectioin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_func_collectioin.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_func_red_packet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_func_red_packet.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_payment_received.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_payment_received.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_sound_tip_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_sound_tip_close.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_sound_tip_open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_sound_tip_open.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_volume_wraning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_volume_wraning.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/img_video_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/img_video_default.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xxhdpi/checkbox_checked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xxhdpi/checkbox_checked.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xxhdpi/discovery_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xxhdpi/discovery_normal.png -------------------------------------------------------------------------------- /WechatBySimple/wrapper/src/main/jniLibs/armeabi-v7a/libmarsxlog.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/wrapper/src/main/jniLibs/armeabi-v7a/libmarsxlog.so -------------------------------------------------------------------------------- /WechatBySimple/wrapper/src/main/jniLibs/x86_64/libstlport_shared.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/wrapper/src/main/jniLibs/x86_64/libstlport_shared.so -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/audio_animation_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/audio_animation_left.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/audio_animation_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/audio_animation_right.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_create_group_cheat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_create_group_cheat.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_file_wall_del_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_file_wall_del_gray.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_friend_circle_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_friend_circle_gray.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_friend_search_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_friend_search_gray.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_friend_to_desktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_friend_to_desktop.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_func_business_card.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_func_business_card.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_remove_team_member.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_remove_team_member.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xxhdpi/wechat_notification.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xxhdpi/wechat_notification.png -------------------------------------------------------------------------------- /WechatBySimple/uploadservice/src/main/aidl/com/simple/upload/FTPUploadTaskParameters.aidl: -------------------------------------------------------------------------------- 1 | // IMyAidlInterface.aidl 2 | package com.simple.upload; 3 | 4 | parcelable FTPUploadTaskParameters; 5 | -------------------------------------------------------------------------------- /WechatBySimple/wrapper/src/main/jniLibs/arm64-v8a/libstlport_shared.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/wrapper/src/main/jniLibs/arm64-v8a/libstlport_shared.so -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_file_wall_del_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_file_wall_del_white.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_file_wall_share_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_file_wall_share_gray.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_file_wall_share_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_file_wall_share_white.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_friend_search_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_friend_search_green.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/img_video_play_session.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/img_video_play_session.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xxhdpi/checkbox_normal_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xxhdpi/checkbox_normal_black.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xxhdpi/checkbox_normal_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xxhdpi/checkbox_normal_white.png -------------------------------------------------------------------------------- /WechatBySimple/wrapper/src/main/jniLibs/armeabi-v7a/libstlport_shared.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/wrapper/src/main/jniLibs/armeabi-v7a/libstlport_shared.so -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable-hdpi/actionsheet_top_normal.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/drawable-hdpi/actionsheet_top_normal.9.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable-hdpi/actionsheet_top_pressed.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/drawable-hdpi/actionsheet_top_pressed.9.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable-hdpi/alert_btn_left_pressed.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/drawable-hdpi/alert_btn_left_pressed.9.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable-hdpi/alert_btn_right_pressed.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/drawable-hdpi/alert_btn_right_pressed.9.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_file_wall_collect_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_file_wall_collect_gray.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_file_wall_collect_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_file_wall_collect_white.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_player_mode_video_wall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/ic_player_mode_video_wall.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/nim_image_download_failed.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/nim_image_download_failed.jpg -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xxhdpi/checkbox_checked_disable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xxhdpi/checkbox_checked_disable.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable-hdpi/actionsheet_bottom_normal.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/drawable-hdpi/actionsheet_bottom_normal.9.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable-hdpi/actionsheet_bottom_pressed.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/drawable-hdpi/actionsheet_bottom_pressed.9.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable-hdpi/actionsheet_middle_normal.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/drawable-hdpi/actionsheet_middle_normal.9.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable-hdpi/actionsheet_middle_pressed.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/drawable-hdpi/actionsheet_middle_pressed.9.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable-hdpi/actionsheet_single_normal.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/drawable-hdpi/actionsheet_single_normal.9.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable-hdpi/actionsheet_single_pressed.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/drawable-hdpi/actionsheet_single_pressed.9.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable-hdpi/alert_btn_single_pressed.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/drawable-hdpi/alert_btn_single_pressed.9.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/audio_animation_list_left_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/audio_animation_list_left_1.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/audio_animation_list_left_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/audio_animation_list_left_2.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/audio_animation_list_left_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/audio_animation_list_left_3.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/audio_animation_list_right_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/audio_animation_list_right_1.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/audio_animation_list_right_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/audio_animation_list_right_2.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/mipmap-xhdpi/audio_animation_list_right_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sps135/wechatbysimple/HEAD/WechatBySimple/app/src/main/res/mipmap-xhdpi/audio_animation_list_right_3.png -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/xml/network_security_config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /WechatBySimple/imlib/src/main/java/com/simple/imlib/listener/ITaskWrapperListener.kt: -------------------------------------------------------------------------------- 1 | package com.simple.imlib.listener 2 | 3 | interface ITaskWrapperListener { 4 | fun onComplete() 5 | 6 | fun onError(message: String) 7 | } -------------------------------------------------------------------------------- /WechatBySimple/wrapper/src/main/java/com/tencent/mars/wrapper/remote/ConnectInfoHandler.java: -------------------------------------------------------------------------------- 1 | package com.tencent.mars.wrapper.remote; 2 | 3 | public interface ConnectInfoHandler { 4 | void connectInfo(boolean isConnected); 5 | } 6 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/base/IBaseBindingAdapterItem.java: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.base; 2 | 3 | public interface IBaseBindingAdapterItem { 4 | //获取Item的类型 5 | int getItemViewType(); 6 | } 7 | -------------------------------------------------------------------------------- /WechatBySimple/wrapper/src/main/java/com/tencent/mars/wrapper/remote/PushMessageHandler.java: -------------------------------------------------------------------------------- 1 | package com.tencent.mars.wrapper.remote; 2 | 3 | 4 | public interface PushMessageHandler { 5 | 6 | void process(PushMessage message); 7 | } 8 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/data/source/remote/network/BaseRequestBodyEntity.kt: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.data.source.remote.network 2 | 3 | data class BaseRequestBodyEntity(var data: String, var serviceCode: Int) { 4 | 5 | } -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable/shape_solid_e5e5e5.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable/shape_red_dot.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/anim/actionsheet_dialog_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/anim/actionsheet_dialog_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable/corner_voice_style.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable/shape_solid_ffffff.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /WechatBySimple/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | /build 12 | /captures 13 | .externalNativeBuild 14 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable/shape_session_btn_send.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable/shape_vertical_line.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /WechatBySimple/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue Dec 25 20:09:30 CST 2018 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip 7 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/anim/slide_left_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/anim/slide_left_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/anim/slide_right_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/anim/slide_right_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/util/IAudioState.java: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.util; 2 | 3 | public abstract class IAudioState { 4 | public IAudioState() { 5 | } 6 | 7 | void enter() { 8 | } 9 | 10 | abstract void handleMessage(AudioStateMessage var1); 11 | } -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable/shape_solid_51aa37_radius_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /WechatBySimple/imlib/src/main/java/com/simple/imlib/listener/IUploadVoiceListener.kt: -------------------------------------------------------------------------------- 1 | package com.simple.imlib.listener 2 | 3 | interface IUploadVoiceListener { 4 | 5 | fun onStart(messageId: String) 6 | 7 | fun onComplete(messageId: String) 8 | 9 | fun onError(messageId: String, errorMessage: String) 10 | } -------------------------------------------------------------------------------- /WechatBySimple/imlib/src/main/java/com/simple/imlib/handler/BusinessHandler.java: -------------------------------------------------------------------------------- 1 | package com.simple.imlib.handler; 2 | 3 | import com.tencent.mars.wrapper.remote.PushMessage; 4 | 5 | public abstract class BusinessHandler { 6 | 7 | public abstract boolean handlerReceivedMessage(PushMessage pushMessage); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /WechatBySimple/imlib/src/main/java/com/simple/imlib/listener/ISendTextMessageListener.kt: -------------------------------------------------------------------------------- 1 | package com.simple.imlib.listener 2 | 3 | interface ISendTextMessageListener { 4 | 5 | fun onStart(messageId: String) 6 | 7 | fun onComplete(messageId: String) 8 | 9 | fun onError(messageId: String, errorMessage: String) 10 | } -------------------------------------------------------------------------------- /WechatBySimple/wrapper/src/main/java/com/tencent/mars/wrapper/service/MarsServiceProfileFactory.java: -------------------------------------------------------------------------------- 1 | package com.tencent.mars.wrapper.service; 2 | 3 | /** 4 | * Created by zhaoyuan on 2016/12/25. 5 | */ 6 | 7 | public interface MarsServiceProfileFactory { 8 | 9 | MarsServiceProfile createMarsServiceProfile(); 10 | } 11 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable/selector_login_btn.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /WechatBySimple/uploadservice/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable/alertdialog_left_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable/alertdialog_right_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable/alertdialog_single_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable/progress_loading.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable/shape_notification_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/layout/act_splash.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable/actionsheet_top_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable/actionsheet_bottom_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable/actionsheet_middle_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable/actionsheet_single_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable/selector_common_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable/selector_edit_focus.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /WechatBySimple/wrapper/src/main/aidl/com/tencent/mars/wrapper/remote/MarsPushMessageFilter.aidl: -------------------------------------------------------------------------------- 1 | // MarsRecvCallBack.aidl 2 | package com.tencent.mars.wrapper.remote; 3 | 4 | // Declare any non-default types here with import statements 5 | 6 | interface MarsPushMessageFilter { 7 | 8 | // returns processed ? 9 | boolean onRecv(int cmdId, inout byte[] buffer); 10 | 11 | } 12 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/util/AudioStateMessage.java: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.util; 2 | 3 | public class AudioStateMessage { 4 | public int what; 5 | public Object obj; 6 | 7 | public AudioStateMessage() { 8 | } 9 | 10 | public static AudioStateMessage obtain() { 11 | return new AudioStateMessage(); 12 | } 13 | } 14 | 15 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable/shape_bottom_gray.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 11 | 12 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable/shape_session_func_press_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 9 | -------------------------------------------------------------------------------- /WechatBySimple/wrapper/src/main/aidl/com/tencent/mars/wrapper/remote/MarsReportConnectInfo.aidl: -------------------------------------------------------------------------------- 1 | // MarsRecvCallBack.aidl 2 | package com.tencent.mars.wrapper.remote; 3 | 4 | // Declare any non-default types here with import statements 5 | 6 | interface MarsReportConnectInfo { 7 | 8 | // returns processed ? 9 | void reportConnectInfo(int status, int longlinkstatus); 10 | 11 | } 12 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable/shape_bottom_green.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 11 | 12 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable/shape_session_func_normal_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 9 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable/shape_stroke_9ec697_solid_b0dca8_radius_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/data/source/remote/network/BaseResponseBodyEntity.kt: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.data.source.remote.network 2 | 3 | data class BaseResponseBodyEntity(var success: Boolean, 4 | var errorCode: Int, 5 | var message: String, 6 | var data: String) { 7 | 8 | } -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/model/action/LongLinkStatusActionModel.java: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.model.action; 2 | 3 | public class LongLinkStatusActionModel { 4 | private int status; 5 | 6 | public int getStatus() { 7 | return status; 8 | } 9 | 10 | public void setStatus(int status) { 11 | this.status = status; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /WechatBySimple/imlib/src/main/java/com/simple/imlib/listener/IUploadImageListener.kt: -------------------------------------------------------------------------------- 1 | package com.simple.imlib.listener 2 | 3 | interface IUploadImageListener { 4 | 5 | fun onStart(messageId: String) 6 | 7 | fun onProgress(messageId: String, percent: Int) 8 | 9 | fun onCancel(messageId: String) 10 | 11 | fun onComplete(messageId: String) 12 | 13 | fun onError(message: String) 14 | } -------------------------------------------------------------------------------- /WechatBySimple/wrapper/src/main/cpp/muduo/copyable.h: -------------------------------------------------------------------------------- 1 | #ifndef MUDUO_BASE_COPYABLE_H 2 | #define MUDUO_BASE_COPYABLE_H 3 | 4 | namespace muduo { 5 | 6 | /// A tag class emphasises the objects are copyable. 7 | /// The empty base class optimization applies. 8 | /// Any derived class of copyable should be a value type. 9 | class copyable { 10 | }; 11 | 12 | }; 13 | 14 | #endif // MUDUO_BASE_COPYABLE_H 15 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/model/action/RefreshUnreadCountModel.java: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.model.action; 2 | 3 | public class RefreshUnreadCountModel { 4 | 5 | private int targetId; 6 | 7 | public int getTargetId() { 8 | return targetId; 9 | } 10 | 11 | public void setTargetId(int targetId) { 12 | this.targetId = targetId; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/data/source/excutor/DiskIOThreadExecutor.kt: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.data.source.excutor 2 | 3 | import java.util.concurrent.Executor 4 | import java.util.concurrent.Executors 5 | 6 | class DiskIOThreadExecutor : Executor { 7 | private val diskIO = Executors.newSingleThreadExecutor() 8 | 9 | override fun execute(command: Runnable?) { 10 | } 11 | } -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/model/databse/LoginStateModel.java: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.model.databse; 2 | 3 | import io.realm.RealmObject; 4 | 5 | public class LoginStateModel extends RealmObject { 6 | 7 | private int uid; 8 | 9 | public int getUid() { 10 | return uid; 11 | } 12 | 13 | public void setUid(int uid) { 14 | this.uid = uid; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /WechatBySimple/imlib/src/main/java/com/simple/imlib/listener/IUploadServiceListener.kt: -------------------------------------------------------------------------------- 1 | package com.simple.imlib.listener 2 | 3 | interface IUploadServiceListener { 4 | fun onStart(uploadId: String) 5 | 6 | fun onProgress(uploadId: String, percent: Int) 7 | 8 | fun onCancel(uploadId: String) 9 | 10 | fun onComplete(uploadId: String, url: String) 11 | 12 | fun onError(uploadId: String, message: String) 13 | } -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable/shape_session_btn_voice_normal.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable/sidebar_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable/shape_horizontal_line.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /WechatBySimple/wrapper/src/main/aidl/com/tencent/mars/wrapper/remote/MarsTaskWrapper.aidl: -------------------------------------------------------------------------------- 1 | // MarsTaskWrapper.aidl 2 | package com.tencent.mars.wrapper.remote; 3 | 4 | // Declare any non-default types here with import statements 5 | 6 | interface MarsTaskWrapper { 7 | 8 | Bundle getProperties(); // called locally 9 | 10 | byte[] req2buf(); 11 | 12 | int buf2resp(in byte[] buf); 13 | 14 | void onTaskEnd(in int errType, in int errCode); 15 | } 16 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable/selector_session_func.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 32dp 4 | 20dp 5 | 20dp 6 | 48dp 7 | 8 | 25dp 9 | 15dp 10 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/layout/act_login.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/layout/act_session.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/test/java/com/simple/wechatsimple/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple 2 | 3 | import org.junit.Test 4 | 5 | import org.junit.Assert.* 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * See [testing documentation](http://d.android.com/tools/testing). 11 | */ 12 | class ExampleUnitTest { 13 | @Test 14 | fun addition_isCorrect() { 15 | assertEquals(4, 2 + 2) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /WechatBySimple/uploadservice/src/main/aidl/com/simple/upload/IUploadInterface.aidl: -------------------------------------------------------------------------------- 1 | // IUploadInterface.aidl 2 | package com.simple.upload; 3 | 4 | // Declare any non-default types here with import statements 5 | import com.simple.upload.FTPUploadTaskParameters; 6 | import com.simple.upload.UploadStatusDelegate; 7 | 8 | interface IUploadInterface { 9 | 10 | void upload(in FTPUploadTaskParameters params); 11 | 12 | void registerDelegate(UploadStatusDelegate delegate, String id); 13 | } 14 | -------------------------------------------------------------------------------- /IMServer/STNetMsgXpHeader.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by root on 9/8/18. 3 | // 4 | 5 | #ifndef PROJECT_STNETMSGXPHEADER_H 6 | #define PROJECT_STNETMSGXPHEADER_H 7 | 8 | #include 9 | struct __STNetMsgXpHeader { 10 | uint32_t head_length; 11 | uint32_t client_version; 12 | uint32_t cmdid; 13 | uint32_t seq; 14 | uint32_t body_length; 15 | uint32_t uid; 16 | }; 17 | 18 | static uint32_t sg_client_version = 200; 19 | 20 | #endif //PROJECT_STNETMSGXPHEADER_H 21 | -------------------------------------------------------------------------------- /WechatBySimple/imlib/src/test/java/com/simple/imlib/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.simple.imlib; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /WechatBySimple/uploadservice/src/test/java/net/gotev/uploadservice/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package net.gotev.uploadservice; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/data/source/DataSource.kt: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.data.source 2 | 3 | import com.simple.wechatsimple.model.databse.UserModel 4 | import io.reactivex.Observable 5 | 6 | 7 | interface DataSource { 8 | 9 | fun login(name: String, password: String): Observable? { 10 | return null 11 | } 12 | 13 | fun getUserList(): Observable>? { 14 | return null 15 | } 16 | 17 | fun getUserInfo(userId: Int): Observable? { 18 | return null 19 | } 20 | } -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable/checkbox_style.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/discovery/DiscoveryFragment.kt: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.discovery 2 | 3 | import android.os.Bundle 4 | import android.support.v4.app.Fragment 5 | import android.view.LayoutInflater 6 | import android.view.View 7 | import android.view.ViewGroup 8 | import com.simple.wechatsimple.R 9 | 10 | class DiscoveryFragment : Fragment() { 11 | override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { 12 | return inflater.inflate(R.layout.frag_discovery, container, false) 13 | } 14 | } -------------------------------------------------------------------------------- /WechatBySimple/uploadservice/src/main/aidl/com/simple/upload/UploadStatusDelegate.aidl: -------------------------------------------------------------------------------- 1 | package com.simple.upload; 2 | 3 | import com.simple.upload.UploadInfo; 4 | import com.simple.upload.ServerResponse; 5 | 6 | interface UploadStatusDelegate { 7 | 8 | void onStart(String id); 9 | 10 | void onProgress(in UploadInfo uploadInfo); 11 | 12 | void onError(in UploadInfo uploadInfo, in ServerResponse serverResponse, String exception); 13 | 14 | void onCompleted(in UploadInfo uploadInfo, in ServerResponse serverResponse); 15 | 16 | void onCancelled(in UploadInfo uploadInfo); 17 | } 18 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable/audio_animation_left_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 11 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/drawable/audio_animation_right_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 11 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /WechatBySimple/wrapper/src/main/cpp/muduo/Buffer.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2010, Shuo Chen. All rights reserved. 2 | // http://code.google.com/p/muduo/ 3 | // 4 | // Use of this source code is governed by a BSD-style license 5 | // that can be found in the License file. 6 | 7 | // Author: Shuo Chen (chenshuo at chenshuo dot com) 8 | // 9 | 10 | #include "Buffer.h" 11 | 12 | #include "SocketsOps.h" 13 | 14 | #include 15 | #include 16 | 17 | using namespace muduo; 18 | using namespace muduo::net; 19 | 20 | const char Buffer::kCRLF[] = "\r\n"; 21 | 22 | const size_t Buffer::kCheapPrepend; 23 | const size_t Buffer::kInitialSize; 24 | 25 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/data/source/inject/Injection.kt: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.data.source.inject 2 | 3 | import com.simple.wechatsimple.data.source.DataSourceRepository 4 | import com.simple.wechatsimple.data.source.excutor.AppExecutors 5 | import com.simple.wechatsimple.data.source.local.LocalDataSource 6 | import com.simple.wechatsimple.data.source.remote.RemoteDataSource 7 | 8 | object Injection { 9 | 10 | fun provideDataRepository(): DataSourceRepository { 11 | return DataSourceRepository.getInstance( 12 | RemoteDataSource.getInstance(AppExecutors()), 13 | LocalDataSource.getInstance(AppExecutors())) 14 | } 15 | } -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/model/databse/UnreadCountModel.java: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.model.databse; 2 | 3 | import io.realm.RealmObject; 4 | 5 | public class UnreadCountModel extends RealmObject { 6 | 7 | private int targetId; 8 | 9 | private int unreadCount; 10 | 11 | public int getTargetId() { 12 | return targetId; 13 | } 14 | 15 | public void setTargetId(int targetId) { 16 | this.targetId = targetId; 17 | } 18 | 19 | public int getUnreadCount() { 20 | return unreadCount; 21 | } 22 | 23 | public void setUnreadCount(int unreadCount) { 24 | this.unreadCount = unreadCount; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/model/ImageMessageItemModel.java: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.model; 2 | 3 | import com.simple.wechatsimple.R; 4 | 5 | public class ImageMessageItemModel extends BaseMessageItemModel { 6 | 7 | private String imageUri; 8 | 9 | public String getImageUri() { 10 | return imageUri; 11 | } 12 | 13 | public void setImageUri(String imageUri) { 14 | this.imageUri = imageUri; 15 | } 16 | 17 | @Override 18 | public int getItemViewType() { 19 | if (isReceived()) { 20 | return R.layout.item_image_receive; 21 | } else { 22 | return R.layout.item_image_send; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /WechatBySimple/wrapper/gradle.properties: -------------------------------------------------------------------------------- 1 | POM_ARTIFACT_ID=mars-wrapper 2 | POM_NAME=mars-wrapper 3 | POM_PACKAGING=jar 4 | 5 | # 库的包名 6 | PROJ_GROUP=com.tencent.mars 7 | # 库的ID 8 | PROJ_ARTIFACTID=mars-wrapper 9 | # 库的版本 10 | PROJ_VERSION=1.1.8 11 | ### 最后 gradle引用的形式就是 $PROJ_GROUP:$PROJ_ARTIFACTID:$PROJ_VERSION 12 | 13 | # 库名 14 | PROJ_NAME=mars-wrapper 15 | # 库的项目主页 16 | PROJ_WEBSITEURL=https://github.com/Tencent/mars 17 | # 问题跟踪地址 18 | PROJ_ISSUETRACKERURL=https://github.com/Tencent/mars/issues 19 | # VCS 地址 20 | PROJ_VCSURL=https://github.com/Tencent/mars.git 21 | # 库的简单描述 22 | PROJ_DESCRIPTION= 23 | 24 | # 开发者的信息, 可以随意 25 | DEVELOPER_ID=shockcao 26 | DEVELOPER_NAME=Cao ShaoKun 27 | DEVELOPER_EMAIL=shockcao@tencent.com 28 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/model/databse/UnreadMessageRecordModel.java: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.model.databse; 2 | 3 | import io.realm.RealmObject; 4 | import io.realm.annotations.PrimaryKey; 5 | 6 | public class UnreadMessageRecordModel extends RealmObject { 7 | 8 | @PrimaryKey 9 | private String id; 10 | 11 | private int targetId; 12 | 13 | public String getId() { 14 | return id; 15 | } 16 | 17 | public void setId(String id) { 18 | this.id = id; 19 | } 20 | 21 | public int getTargetId() { 22 | return targetId; 23 | } 24 | 25 | public void setTargetId(int targetId) { 26 | this.targetId = targetId; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /WechatBySimple/uploadservice/src/main/java/com/simple/upload/schemehandlers/SchemeHandler.java: -------------------------------------------------------------------------------- 1 | package com.simple.upload.schemehandlers; 2 | 3 | import android.content.Context; 4 | 5 | import java.io.FileNotFoundException; 6 | import java.io.InputStream; 7 | 8 | /** 9 | * Allows for different file representations to be used by abstracting several characteristics 10 | * and operations 11 | * @author stephentuso 12 | * @author gotev 13 | */ 14 | public interface SchemeHandler { 15 | void init(String path); 16 | long getLength(Context context); 17 | InputStream getInputStream(Context context) throws FileNotFoundException; 18 | String getContentType(Context context); 19 | String getName(Context context); 20 | } 21 | -------------------------------------------------------------------------------- /WechatBySimple/wrapper/src/main/java/com/tencent/mars/wrapper/remote/PackageUtils.java: -------------------------------------------------------------------------------- 1 | package com.tencent.mars.wrapper.remote; 2 | 3 | import java.util.ArrayList; 4 | 5 | public class PackageUtils { 6 | static { 7 | System.loadLibrary("native-lib"); 8 | } 9 | 10 | public static byte[] packageData(byte[] data, String typeName) { 11 | return packageDataNative(data, data.length, typeName); 12 | } 13 | 14 | public static byte[] unpackData(byte[] data) { 15 | return unpackDataNative(data, data.length); 16 | } 17 | 18 | private static native byte[] packageDataNative(byte[] data, int length, String typeName); 19 | 20 | private static native byte[] unpackDataNative(byte[] data, int length); 21 | } 22 | -------------------------------------------------------------------------------- /WechatBySimple/wrapper/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/guang_hik/android-sdks/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/model/databse/ConversationModel.java: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.model.databse; 2 | 3 | import io.realm.RealmObject; 4 | import io.realm.annotations.PrimaryKey; 5 | 6 | public class ConversationModel extends RealmObject { 7 | 8 | private int conversation; 9 | 10 | @PrimaryKey 11 | private int targetId; 12 | 13 | public int getConversation() { 14 | return conversation; 15 | } 16 | 17 | public void setConversation(int conversation) { 18 | this.conversation = conversation; 19 | } 20 | 21 | public int getTargetId() { 22 | return targetId; 23 | } 24 | 25 | public void setTargetId(int targetId) { 26 | this.targetId = targetId; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /WechatBySimple/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx1536m 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | 15 | -------------------------------------------------------------------------------- /WechatBySimple/wrapper/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 13 | 14 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/androidTest/java/com/simple/wechatsimple/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple 2 | 3 | import android.support.test.InstrumentationRegistry 4 | import android.support.test.runner.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getTargetContext() 22 | assertEquals("com.simple.wechatsimple", appContext.packageName) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /IMApiServer/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.12) 2 | project(IMApiServer) 3 | 4 | set(CMAKE_CXX_STANDARD 11) 5 | 6 | set(ZLIB_INCLUDE "/usr/local/zlib/include") 7 | set(ZLIB_LIB "/usr/local/zlib/lib") 8 | 9 | set(MYSQL_INCLUDE "/usr/include/mysql") 10 | set(MYSQL_LIB "/usr/lib64/mysql") 11 | 12 | set(MYSQLPP_INCLUDE "/usr/local/include/mysql++") 13 | set(MYSQLPP_LIB "/usr/local/lib") 14 | 15 | include_directories(${ZLIB_INCLUDE}) 16 | link_directories(${ZLIB_LIB}) 17 | 18 | include_directories(${MYSQLPP_INCLUDE}) 19 | link_directories(${MYSQLPP_LIB}) 20 | 21 | include_directories(${MYSQL_INCLUDE}) 22 | link_directories(${MYSQL_LIB}) 23 | 24 | add_executable(IMApiServer IMServer.cpp CJsonObjectBase.h CJsonObjectBase.cpp BaseData.h) 25 | target_link_libraries(IMApiServer z boost_system mysqlclient mysqlpp json_linux-gcc-4.8.5_libmt) -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/data/source/excutor/AppExecutors.kt: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.data.source.excutor 2 | 3 | import android.os.Handler 4 | import android.os.Looper 5 | import java.util.concurrent.Executor 6 | import java.util.concurrent.Executors 7 | 8 | const val THREAD_COUNT = 3 9 | 10 | open class AppExecutors constructor( 11 | val diskIO: Executor = DiskIOThreadExecutor(), 12 | val networkIO: Executor = Executors.newFixedThreadPool(THREAD_COUNT), 13 | val mainThread: Executor = MainThreadExecutor() 14 | ) { 15 | private class MainThreadExecutor : Executor { 16 | private val mainThreadExecutor = Handler(Looper.getMainLooper()) 17 | 18 | override fun execute(command: Runnable?) { 19 | mainThreadExecutor.post(command) 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /WechatBySimple/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /WechatBySimple/imlib/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /WechatBySimple/uploadservice/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion 28 5 | 6 | 7 | 8 | defaultConfig { 9 | minSdkVersion 16 10 | targetSdkVersion 28 11 | versionCode 1 12 | versionName "1.0" 13 | 14 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 15 | 16 | } 17 | 18 | buildTypes { 19 | release { 20 | minifyEnabled false 21 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 22 | } 23 | } 24 | 25 | } 26 | 27 | dependencies { 28 | implementation fileTree(dir: 'libs', include: ['*.jar']) 29 | 30 | implementation 'commons-net:commons-net:3.6' 31 | implementation "com.android.support:support-v4:$rootProject.supportLibraryVersion" 32 | } 33 | -------------------------------------------------------------------------------- /WechatBySimple/uploadservice/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/main/TabEntity.java: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.main; 2 | 3 | import com.flyco.tablayout.listener.CustomTabEntity; 4 | 5 | public class TabEntity implements CustomTabEntity { 6 | public String title; 7 | public int selectedIcon; 8 | public int unSelectedIcon; 9 | 10 | public TabEntity(String title, int selectedIcon, int unSelectedIcon) { 11 | this.title = title; 12 | this.selectedIcon = selectedIcon; 13 | this.unSelectedIcon = unSelectedIcon; 14 | } 15 | 16 | @Override 17 | public String getTabTitle() { 18 | return title; 19 | } 20 | 21 | @Override 22 | public int getTabSelectedIcon() { 23 | return selectedIcon; 24 | } 25 | 26 | @Override 27 | public int getTabUnselectedIcon() { 28 | return unSelectedIcon; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/data/source/remote/network/NetworkApi.kt: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.data.source.remote.network 2 | 3 | import io.reactivex.Observable 4 | import okhttp3.RequestBody 5 | import retrofit2.http.Body 6 | import retrofit2.http.Headers 7 | import retrofit2.http.POST 8 | import retrofit2.http.Path 9 | 10 | 11 | interface NetworkApi { 12 | 13 | @Headers("Content-Type: application/json; charset=utf-8") 14 | @POST("*/*") 15 | fun login(@Body data: RequestBody): Observable 16 | 17 | @Headers("Content-Type: application/json; charset=utf-8") 18 | @POST("*/*") 19 | fun userList(@Body data: RequestBody): Observable 20 | 21 | @Headers("Content-Type: application/json; charset=utf-8") 22 | @POST("*/*") 23 | fun userInfo(@Body data: RequestBody): Observable 24 | } -------------------------------------------------------------------------------- /WechatBySimple/uploadservice/src/androidTest/java/net/gotev/uploadservice/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package net.gotev.uploadservice; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumented test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("net.gotev.uploadservice.test", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /WechatBySimple/wrapper/src/main/aidl/com/tencent/mars/wrapper/remote/MarsService.aidl: -------------------------------------------------------------------------------- 1 | // IMarsService.aidl 2 | package com.tencent.mars.wrapper.remote; 3 | 4 | // Declare any non-default types here with import statements 5 | 6 | import com.tencent.mars.wrapper.remote.MarsTaskWrapper; 7 | import com.tencent.mars.wrapper.remote.MarsPushMessageFilter; 8 | import com.tencent.mars.wrapper.remote.MarsReportConnectInfo; 9 | 10 | interface MarsService { 11 | 12 | int send(MarsTaskWrapper taskWrapper, in Bundle taskProperties); 13 | 14 | void cancel(int taskID); 15 | 16 | void registerPushMessageFilter(MarsPushMessageFilter filter); 17 | 18 | void unregisterPushMessageFilter(MarsPushMessageFilter filter); 19 | 20 | void setAccountInfo(in long uin, in String userName); 21 | 22 | void setForeground(in int isForeground); 23 | 24 | void connectToServer(); 25 | 26 | void disconnect(); 27 | 28 | void registerReportConnectInfo(MarsReportConnectInfo connectInfo); 29 | } 30 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/login/LoginActivity.kt: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.login 2 | 3 | import android.os.Bundle 4 | import android.support.v7.app.AppCompatActivity 5 | import com.jaeger.library.StatusBarUtil 6 | import com.simple.wechatsimple.R 7 | import com.simple.wechatsimple.base.BaseActivity 8 | import com.simple.wechatsimple.util.obtainViewModel 9 | import com.simple.wechatsimple.util.replaceFragmentInActivity 10 | 11 | class LoginActivity : BaseActivity() { 12 | 13 | override fun onCreate(savedInstanceState: Bundle?) { 14 | super.onCreate(savedInstanceState) 15 | setContentView(R.layout.act_login) 16 | replaceFragmentInActivity(findOrCreateViewFragment(), R.id.contentFrame) 17 | } 18 | 19 | private fun findOrCreateViewFragment() = 20 | supportFragmentManager.findFragmentById(R.id.contentFrame) ?: LoginFragment() 21 | 22 | fun obtainViewModel(): LoginViewModel = obtainViewModel(LoginViewModel::class.java) 23 | 24 | } -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/layout/fragment_recent_message.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 12 | 13 | 14 | 19 | 20 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/model/TextMessageItemModel.java: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.model; 2 | 3 | import android.text.SpannableString; 4 | 5 | import com.simple.wechatsimple.R; 6 | 7 | public class TextMessageItemModel extends BaseMessageItemModel { 8 | 9 | private SpannableString message; 10 | 11 | private String messageText; 12 | 13 | public String getMessageText() { 14 | return messageText; 15 | } 16 | 17 | public void setMessageText(String messageText) { 18 | this.messageText = messageText; 19 | } 20 | 21 | public SpannableString getMessage() { 22 | return message; 23 | } 24 | 25 | public void setMessage(SpannableString message) { 26 | this.message = message; 27 | } 28 | 29 | @Override 30 | public int getItemViewType() { 31 | if (isReceived()) { 32 | return R.layout.item_text_receive; 33 | } else { 34 | return R.layout.item_text_send; 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/util/AppCompatActivityExt.kt: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.util 2 | 3 | import android.arch.lifecycle.ViewModel 4 | import android.arch.lifecycle.ViewModelProvider 5 | import android.arch.lifecycle.ViewModelProviders 6 | import android.support.v4.app.Fragment 7 | import android.support.v4.app.FragmentManager 8 | import android.support.v4.app.FragmentTransaction 9 | import android.support.v7.app.AppCompatActivity 10 | 11 | fun AppCompatActivity.replaceFragmentInActivity(fragment: Fragment, fragmentId: Int) { 12 | supportFragmentManager.transact { 13 | replace(fragmentId, fragment) 14 | } 15 | } 16 | 17 | fun AppCompatActivity.obtainViewModel(viewModelClass: Class) = 18 | ViewModelProviders.of(this, ViewModelFactory.getInstance(application)).get(viewModelClass) 19 | 20 | private inline fun FragmentManager.transact(action: FragmentTransaction.() -> Unit) { 21 | beginTransaction().apply { 22 | action() 23 | }.commit() 24 | } -------------------------------------------------------------------------------- /WechatBySimple/imlib/src/main/java/com/simple/imlib/handler/LogOutMessageHandler.java: -------------------------------------------------------------------------------- 1 | package com.simple.imlib.handler; 2 | 3 | import android.content.ComponentName; 4 | import android.content.Context; 5 | import android.content.Intent; 6 | 7 | import com.simple.imlib.constant.Constant; 8 | import com.tencent.mars.wrapper.remote.PushMessage; 9 | 10 | public class LogOutMessageHandler extends BusinessHandler { 11 | private Context context; 12 | 13 | public LogOutMessageHandler(Context context) { 14 | this.context = context; 15 | } 16 | 17 | @Override 18 | public boolean handlerReceivedMessage(PushMessage pushMessage) { 19 | if (pushMessage.cmdId == Constant.LOG_OUT_CMDID) { 20 | Intent intent = new Intent(); 21 | intent.setAction(Constant.LOG_OUT_ACTION); 22 | intent.setComponent(new ComponentName(Constant.PACKAGE_NAME, Constant.CLS)); 23 | context.sendBroadcast(intent); 24 | return true; 25 | } 26 | return false; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /WechatBySimple/wrapper/src/main/cpp/parse.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Simple on 2018/8/27. 3 | // 4 | 5 | #ifndef MYAPPLICATION_PARSE_H 6 | #define MYAPPLICATION_PARSE_H 7 | 8 | 9 | 10 | void fillEmptyBuffer(muduo::net::Buffer *buffer, const std::string &typeName, const char *message, 11 | const int length) { 12 | int32_t nameLength = static_cast(typeName.size() + 1); 13 | buffer->appendInt32(nameLength); 14 | buffer->append(typeName.c_str(), nameLength); 15 | 16 | buffer->ensureWritableBytes(length); 17 | buffer->append(message, length); 18 | 19 | int32_t check_sum = static_cast( 20 | ::adler32(1, 21 | reinterpret_cast(buffer->peek()), 22 | static_cast(buffer->readableBytes()))); 23 | buffer->appendInt32(check_sum); 24 | 25 | int32_t len = muduo::net::sockets::hostToNetwork32(buffer->readableBytes()); 26 | buffer->prepend(&len, sizeof len); 27 | } 28 | 29 | 30 | #endif //MYAPPLICATION_PARSE_H 31 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/data/source/local/LocalDataSource.kt: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.data.source.local 2 | 3 | import com.simple.wechatsimple.data.source.DataSource 4 | import com.simple.wechatsimple.data.source.excutor.AppExecutors 5 | import com.simple.wechatsimple.model.databse.UserModel 6 | import io.reactivex.Observable 7 | 8 | class LocalDataSource private constructor(val appExecutors: AppExecutors) : DataSource { 9 | 10 | override fun getUserInfo(userId: Int): Observable? { 11 | return super.getUserInfo(userId) 12 | } 13 | 14 | companion object { 15 | private var INSTANCE: LocalDataSource? = null 16 | 17 | @JvmStatic 18 | fun getInstance(appExecutors: AppExecutors): LocalDataSource { 19 | if (INSTANCE == null) { 20 | synchronized(LocalDataSource::class.java) { 21 | INSTANCE = LocalDataSource(appExecutors) 22 | } 23 | } 24 | return INSTANCE!! 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /WechatBySimple/uploadservice/src/main/java/com/simple/upload/DefaultLoggerDelegate.java: -------------------------------------------------------------------------------- 1 | package com.simple.upload; 2 | 3 | import android.util.Log; 4 | 5 | /** 6 | * Default logger delegate implementation which logs in LogCat with {@link Log}. 7 | * Log tag is set to UploadService for all the logs. 8 | * @author gotev (Aleksandar Gotev) 9 | */ 10 | public class DefaultLoggerDelegate implements Logger.LoggerDelegate { 11 | 12 | private static final String TAG = "UploadService"; 13 | 14 | @Override 15 | public void error(String tag, String message) { 16 | Log.e(TAG, tag + " - " + message); 17 | } 18 | 19 | @Override 20 | public void error(String tag, String message, Throwable exception) { 21 | Log.e(TAG, tag + " - " + message, exception); 22 | } 23 | 24 | @Override 25 | public void debug(String tag, String message) { 26 | Log.d(TAG, tag + " - " + message); 27 | } 28 | 29 | @Override 30 | public void info(String tag, String message) { 31 | Log.i(TAG, tag + " - " + message); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /WechatBySimple/imlib/src/main/java/com/simple/imlib/constant/Constant.kt: -------------------------------------------------------------------------------- 1 | package com.simple.imlib.constant 2 | 3 | class Constant { 4 | companion object { 5 | const val PACKAGE_NAME = "com.simple.wechatsimple" 6 | const val CLS = "com.simple.wechatsimple.util.PushReceiver" 7 | 8 | const val PRIVATE_MESSAGE = 1 9 | const val GROUP_MESSAGE = 2 10 | 11 | const val FTP_SERVER_URL = "XXX.XXX.XXX.XXX" 12 | const val FTP_SERVER_BASE_URL = "http://XXX.XXX.XXX.XXX:XX" 13 | const val DEFAULT_PORTRAIT_URL = "http://XXX.XXX.XXX.XXX:XX/DefaultPortrait.jpg" 14 | const val FTP_SERVER_PORT = 21 15 | const val FTP_USERNAME = "XXX" 16 | const val FTP_PASSWORD = "XXX" 17 | 18 | const val LOG_OUT_CMDID = 20000 19 | const val MESSAGE_CMDID = 20001 20 | 21 | const val LOG_OUT_ACTION = "LOG_OUT" 22 | const val MESSAGE_ACTION = "MESSAGE" 23 | 24 | const val IMAGE_TYPE = 1 25 | const val TEXT_TYPE = 2 26 | const val AUDIO_TYPE = 3 27 | const val VOICE_TYPE = 4 28 | } 29 | } -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/util/MD5.java: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.util; 2 | 3 | import android.text.TextUtils; 4 | 5 | import java.security.MessageDigest; 6 | import java.security.NoSuchAlgorithmException; 7 | 8 | public class MD5 { 9 | 10 | public static String md5(String string) { 11 | if (TextUtils.isEmpty(string)) { 12 | return ""; 13 | } 14 | MessageDigest md5 = null; 15 | try { 16 | md5 = MessageDigest.getInstance("MD5"); 17 | byte[] bytes = md5.digest(string.getBytes()); 18 | StringBuilder result = new StringBuilder(); 19 | for (byte b : bytes) { 20 | String temp = Integer.toHexString(b & 0xff); 21 | if (temp.length() == 1) { 22 | temp = "0" + temp; 23 | } 24 | result.append(temp); 25 | } 26 | return result.toString(); 27 | } catch (NoSuchAlgorithmException e) { 28 | e.printStackTrace(); 29 | } 30 | return ""; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/util/GsonUtil.java: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.util; 2 | 3 | import com.google.gson.Gson; 4 | 5 | import java.lang.reflect.ParameterizedType; 6 | import java.lang.reflect.Type; 7 | import java.util.List; 8 | 9 | public class GsonUtil { 10 | 11 | public static List parseString2List(String json, Class clazz) { 12 | Type type = new ParameterizedTypeImpl(clazz); 13 | List list = new Gson().fromJson(json, type); 14 | return list; 15 | } 16 | 17 | private static class ParameterizedTypeImpl implements ParameterizedType { 18 | Class clazz; 19 | 20 | public ParameterizedTypeImpl(Class clz) { 21 | clazz = clz; 22 | } 23 | 24 | @Override 25 | public Type[] getActualTypeArguments() { 26 | return new Type[]{clazz}; 27 | } 28 | 29 | @Override 30 | public Type getRawType() { 31 | return List.class; 32 | } 33 | 34 | @Override 35 | public Type getOwnerType() { 36 | return null; 37 | } 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /WechatBySimple/wrapper/src/main/java/com/tencent/mars/wrapper/remote/PushMessage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Tencent is pleased to support the open source community by making Mars available. 3 | * Copyright (C) 2016 THL A29 Limited, a Tencent company. All rights reserved. 4 | * 5 | * Licensed under the MIT License (the "License"); you may not use this file except in 6 | * compliance with the License. You may obtain a copy of the License at 7 | * http://opensource.org/licenses/MIT 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 11 | * either express or implied. See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | package com.tencent.mars.wrapper.remote; 16 | 17 | /** 18 | * Created by caoshaokun on 16/12/20. 19 | */ 20 | public class PushMessage { 21 | 22 | public PushMessage(int cmdId, byte[] buffer) { 23 | this.cmdId = cmdId; 24 | this.buffer = buffer; 25 | } 26 | 27 | public int cmdId; 28 | 29 | public byte[] buffer; 30 | 31 | } 32 | -------------------------------------------------------------------------------- /WechatBySimple/wrapper/src/main/java/com/tencent/mars/utils/print/BaseConstants.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Tencent is pleased to support the open source community by making Mars available. 3 | * Copyright (C) 2016 THL A29 Limited, a Tencent company. All rights reserved. 4 | * 5 | * Licensed under the MIT License (the "License"); you may not use this file except in 6 | * compliance with the License. You may obtain a copy of the License at 7 | * http://opensource.org/licenses/MIT 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 11 | * either express or implied. See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | package com.tencent.mars.utils.print; 16 | 17 | /** 18 | * Created by caoshaokun on 16/12/21. 19 | */ 20 | public interface BaseConstants { 21 | 22 | int PUSHMSG_CMDID = 10001; 23 | 24 | int FLOW_CMDID = 10002; 25 | 26 | int CONNSTATUS_CMDID = 10003; 27 | 28 | int CGIHISTORY_CMDID = 10004; 29 | 30 | int SDTRESULT_CMDID = 10005; 31 | 32 | } 33 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/base/BaseModelView.kt: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.base 2 | 3 | import android.app.Application 4 | import android.arch.lifecycle.AndroidViewModel 5 | import io.reactivex.disposables.CompositeDisposable 6 | import io.reactivex.functions.Consumer 7 | import java.net.SocketTimeoutException 8 | 9 | open class BaseModelView(context: Application) : AndroidViewModel(context) { 10 | 11 | val showLoadingEvent = SingleLiveEvent() 12 | 13 | val hideLoadingEvent = SingleLiveEvent() 14 | 15 | val showMessageEvent = SingleLiveEvent() 16 | 17 | protected val mDisposable = CompositeDisposable() 18 | 19 | override fun onCleared() { 20 | super.onCleared() 21 | mDisposable.dispose() 22 | } 23 | 24 | inner class DefaultErrorCallback : Consumer { 25 | override fun accept(t: Throwable?) { 26 | hideLoadingEvent.call() 27 | when (t) { 28 | is SocketTimeoutException -> showMessageEvent.value = "链接失败,请检查你的网络设置" 29 | else -> showMessageEvent.value = t!!.message 30 | } 31 | } 32 | } 33 | 34 | } -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/model/VoiceMessageItemModel.java: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.model; 2 | 3 | import com.simple.wechatsimple.R; 4 | 5 | public class VoiceMessageItemModel extends BaseMessageItemModel { 6 | 7 | private int duration; 8 | 9 | private String audioUri; 10 | 11 | public int getDuration() { 12 | return duration; 13 | } 14 | 15 | public void setDuration(int duration) { 16 | this.duration = duration; 17 | } 18 | 19 | public String getAudioUri() { 20 | return audioUri; 21 | } 22 | 23 | public void setAudioUri(String audioUri) { 24 | this.audioUri = audioUri; 25 | } 26 | 27 | @Override 28 | public int getItemViewType() { 29 | if (isReceived()) { 30 | return R.layout.item_audio_receive; 31 | } else { 32 | return R.layout.item_audio_send; 33 | } 34 | } 35 | 36 | @Override 37 | public boolean equals(Object obj) { 38 | if (obj instanceof VoiceMessageItemModel) { 39 | return ((VoiceMessageItemModel) obj).getId().equals(getId()); 40 | } 41 | 42 | return false; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /WechatBySimple/wrapper/src/main/java/com/tencent/mars/wrapper/service/MarsServiceProfile.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Tencent is pleased to support the open source community by making Mars available. 3 | * Copyright (C) 2016 THL A29 Limited, a Tencent company. All rights reserved. 4 | * 5 | * Licensed under the MIT License (the "License"); you may not use this file except in 6 | * compliance with the License. You may obtain a copy of the License at 7 | * http://opensource.org/licenses/MIT 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 11 | * either express or implied. See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | package com.tencent.mars.wrapper.service; 16 | 17 | /** 18 | * profile interface. 19 | *

20 | * Created by zhaoyuan on 2016/11/16. 21 | */ 22 | 23 | public interface MarsServiceProfile { 24 | 25 | short magic(); 26 | 27 | short productID(); 28 | 29 | String longLinkHost(); 30 | 31 | int[] longLinkPorts(); 32 | 33 | int shortLinkPort(); 34 | } 35 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/util/IAudioRecordListener.java: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.util; 2 | 3 | import android.net.Uri; 4 | 5 | public interface IAudioRecordListener { 6 | 7 | /** 8 | * 初始化提示视图 9 | */ 10 | void initTipView(); 11 | 12 | /** 13 | * 设置倒计时提示视图 14 | * 15 | * @param counter 10秒倒计时 16 | */ 17 | void setTimeoutTipView(int counter); 18 | 19 | /** 20 | * 设置正在录制提示视图 21 | */ 22 | void setRecordingTipView(); 23 | 24 | /** 25 | * 设置语音长度太短提示视图 26 | */ 27 | void setAudioShortTipView(); 28 | 29 | /** 30 | * 设置取消提示视图 31 | */ 32 | void setCancelTipView(); 33 | 34 | /** 35 | * 销毁提示视图 36 | */ 37 | void destroyTipView(); 38 | 39 | /** 40 | * 开始录制 41 | * 如果是做IM的话,这里可以发送一个消息,如:对方正在讲话 42 | */ 43 | void onStartRecord(); 44 | 45 | /** 46 | * 录制结束 47 | * 48 | * @param audioPath 语音文件路径 49 | * @param duration 语音文件时长 50 | */ 51 | void onFinish(Uri audioPath, int duration); 52 | 53 | /** 54 | * 分贝改变 55 | * 56 | * @param db 分贝 57 | */ 58 | void onAudioDBChanged(int db); 59 | 60 | } 61 | 62 | -------------------------------------------------------------------------------- /IMServer/query.proto: -------------------------------------------------------------------------------- 1 | package muduo; 2 | 3 | message Response { 4 | required int32 error_code = 1; 5 | optional string error_msg = 2; 6 | 7 | enum ErrorCode { 8 | NO_ERROR = 1; 9 | DATABASE_EEROR = 2; 10 | LOG_OUT = 3; 11 | } 12 | } 13 | 14 | message Logout { 15 | 16 | } 17 | 18 | message LoginRequest { 19 | required int64 user_id = 1; 20 | } 21 | 22 | message UserInfo { 23 | required string nickname = 1; 24 | 25 | required string portrait = 2; 26 | } 27 | 28 | message IMMessage { 29 | required string id = 1; 30 | 31 | required int32 fromUserId = 2; 32 | 33 | required ConversationType conversationType = 4; 34 | 35 | required MessageType messageType = 3; 36 | 37 | optional UserInfo userInfo = 5; 38 | 39 | optional int64 targetId = 6; 40 | 41 | optional int64 createAt = 7; 42 | 43 | required string extras = 8; 44 | 45 | enum ConversationType { 46 | PRIVATE = 1; 47 | GROUP = 2; 48 | } 49 | 50 | enum MessageType { 51 | TEXT_MESSGAGE = 1; 52 | IMAGE_MESSGAGE = 2; 53 | VOICE_MESSGAGE = 3; 54 | } 55 | } 56 | 57 | message HistoryMessage { 58 | required int32 id = 1; 59 | } 60 | 61 | -------------------------------------------------------------------------------- /WechatBySimple/uploadservice/src/main/java/com/simple/upload/schemehandlers/FileSchemeHandler.java: -------------------------------------------------------------------------------- 1 | package com.simple.upload.schemehandlers; 2 | 3 | import android.content.Context; 4 | 5 | import com.simple.upload.ContentType; 6 | 7 | import java.io.File; 8 | import java.io.FileInputStream; 9 | import java.io.FileNotFoundException; 10 | import java.io.InputStream; 11 | 12 | /** 13 | * Handler for normal file paths, wraps java.io.File 14 | * @author stephentuso 15 | */ 16 | class FileSchemeHandler implements SchemeHandler { 17 | 18 | private File file; 19 | 20 | @Override 21 | public void init(String path) { 22 | file = new File(path); 23 | } 24 | 25 | @Override 26 | public long getLength(Context context) { 27 | return file.length(); 28 | } 29 | 30 | @Override 31 | public InputStream getInputStream(Context context) throws FileNotFoundException { 32 | return new FileInputStream(file); 33 | } 34 | 35 | @Override 36 | public String getContentType(Context context) { 37 | return ContentType.autoDetect(file.getAbsolutePath()); 38 | } 39 | 40 | @Override 41 | public String getName(Context context) { 42 | return file.getName(); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /WechatBySimple/imlib/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | apply plugin: 'kotlin-android-extensions' 3 | apply plugin: 'kotlin-android' 4 | 5 | android { 6 | compileSdkVersion 28 7 | 8 | 9 | 10 | defaultConfig { 11 | minSdkVersion 16 12 | targetSdkVersion 28 13 | versionCode 1 14 | versionName "1.0" 15 | 16 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 17 | 18 | } 19 | 20 | buildTypes { 21 | release { 22 | minifyEnabled false 23 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 24 | } 25 | } 26 | 27 | } 28 | 29 | dependencies { 30 | implementation fileTree(dir: 'libs', include: ['*.jar']) 31 | implementation project(':uploadservice') 32 | implementation project(':wrapper') 33 | implementation "com.tencent.mars:mars-core:1.2.1" 34 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 35 | implementation 'com.google.protobuf:protobuf-java:3.5.1' 36 | implementation 'org.greenrobot:eventbus:3.1.1' 37 | implementation 'com.google.code.gson:gson:2.8.5' 38 | 39 | } 40 | repositories { 41 | mavenCentral() 42 | } 43 | -------------------------------------------------------------------------------- /WechatBySimple/wrapper/src/main/proto/query.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto2"; 2 | package muduo; 3 | option java_package = "com.proto.imlib"; 4 | option java_outer_classname = "Muduo"; 5 | 6 | message Response { 7 | required int32 error_code = 1; 8 | optional string error_msg = 2; 9 | 10 | enum ErrorCode { 11 | NO_ERROR = 1; 12 | DATABASE_EEROR = 2; 13 | LOG_OUT = 3; 14 | } 15 | } 16 | 17 | message LoginRequest { 18 | required int64 user_id = 1; 19 | } 20 | 21 | message UserInfo { 22 | required string nickname = 1; 23 | 24 | required string portrait = 2; 25 | } 26 | 27 | message IMMessage { 28 | required string id = 1; 29 | 30 | required int32 fromUserId = 2; 31 | 32 | required ConversationType conversationType = 4; 33 | 34 | required MessageType messageType = 3; 35 | 36 | optional UserInfo userInfo = 5; 37 | 38 | optional int64 targetId = 6; 39 | 40 | optional int64 createAt = 7; 41 | 42 | required string extras = 8; 43 | 44 | enum ConversationType { 45 | PRIVATE = 1; 46 | GROUP = 2; 47 | } 48 | 49 | enum MessageType { 50 | TEXT_MESSGAGE = 1; 51 | IMAGE_MESSGAGE = 2; 52 | VOICE_MESSGAGE = 3; 53 | } 54 | } 55 | 56 | message HistoryMessage { 57 | required int32 id = 1; 58 | } 59 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/layout/act_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 16 | 17 | 21 | 22 | 34 | 35 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/model/databse/UserModel.java: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.model.databse; 2 | 3 | import io.realm.RealmObject; 4 | import io.realm.annotations.Ignore; 5 | import io.realm.annotations.PrimaryKey; 6 | 7 | public class UserModel extends RealmObject { 8 | 9 | @PrimaryKey 10 | private int uid; 11 | 12 | private String nickname; 13 | 14 | private String portrait; 15 | 16 | private boolean isSelf; 17 | 18 | @Ignore 19 | private String pinyin; 20 | 21 | public int getUid() { 22 | return uid; 23 | } 24 | 25 | public void setUid(int uid) { 26 | this.uid = uid; 27 | } 28 | 29 | public String getNickname() { 30 | return nickname; 31 | } 32 | 33 | public void setNickname(String nickname) { 34 | this.nickname = nickname; 35 | } 36 | 37 | public String getPortrait() { 38 | return portrait; 39 | } 40 | 41 | public void setPortrait(String portrait) { 42 | this.portrait = portrait; 43 | } 44 | 45 | public String getPinyin() { 46 | return pinyin; 47 | } 48 | 49 | public void setPinyin(String pinyin) { 50 | this.pinyin = pinyin; 51 | } 52 | 53 | public boolean isSelf() { 54 | return isSelf; 55 | } 56 | 57 | public void setSelf(boolean self) { 58 | isSelf = self; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/base/BaseBindRecyclerViewAdapter.java: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.base; 2 | 3 | import android.content.Context; 4 | import android.support.v7.widget.RecyclerView; 5 | import android.view.LayoutInflater; 6 | import android.view.ViewGroup; 7 | 8 | import java.util.List; 9 | 10 | public abstract class BaseBindRecyclerViewAdapter extends RecyclerView.Adapter { 11 | 12 | public List mList; //数据源 13 | public LayoutInflater inflater; 14 | 15 | public BaseBindRecyclerViewAdapter(Context context, List mList) { 16 | this.mList = mList; 17 | inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); 18 | } 19 | 20 | @Override 21 | public int getItemCount() { 22 | return mList.size(); 23 | } 24 | 25 | @Override 26 | public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { 27 | return onCreateMyViewHolder(parent,viewType); 28 | } 29 | 30 | @Override 31 | public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { 32 | onBindMyViewHolder(holder, position); 33 | } 34 | 35 | //获取Item布局 36 | public abstract RecyclerView.ViewHolder onCreateMyViewHolder(ViewGroup parent, int viewType); 37 | 38 | //绑定数据 39 | public abstract void onBindMyViewHolder(RecyclerView.ViewHolder holder, int position); 40 | } 41 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/layout/item_notification.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 23 | 24 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/data/source/DataSourceRepository.kt: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.data.source 2 | 3 | import com.simple.wechatsimple.data.source.local.LocalDataSource 4 | import com.simple.wechatsimple.data.source.remote.RemoteDataSource 5 | import com.simple.wechatsimple.model.databse.UserModel 6 | import io.reactivex.Observable 7 | 8 | class DataSourceRepository(val remoteDataSource: RemoteDataSource, 9 | val localDataSource: LocalDataSource) : DataSource { 10 | 11 | override fun login(name: String, password: String): Observable? { 12 | return remoteDataSource.login(name, password) 13 | } 14 | 15 | override fun getUserList(): Observable>? { 16 | return remoteDataSource.getUserList() 17 | } 18 | 19 | override fun getUserInfo(userId: Int): Observable? { 20 | return remoteDataSource.getUserInfo(userId) 21 | } 22 | 23 | companion object { 24 | private var INSTANCE: DataSourceRepository? = null 25 | 26 | @JvmStatic 27 | fun getInstance(remoteSource: RemoteDataSource, 28 | localSource: LocalDataSource) = 29 | INSTANCE ?: synchronized(DataSourceRepository::class.java) { 30 | INSTANCE ?: DataSourceRepository(remoteSource, localSource).also { 31 | INSTANCE = it 32 | } 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/layout/frag_contacts.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 14 | 15 | 16 | 20 | 21 | 30 | 31 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/layout/item_no_support_msg_type.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 23 | 24 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /WechatBySimple/wrapper/src/main/cpp/muduo/Endian.h: -------------------------------------------------------------------------------- 1 | // Copyright 2010, Shuo Chen. All rights reserved. 2 | // http://code.google.com/p/muduo/ 3 | // 4 | // Use of this source code is governed by a BSD-style license 5 | // that can be found in the License file. 6 | 7 | // Author: Shuo Chen (chenshuo at chenshuo dot com) 8 | // 9 | // This is a public header file, it must only include public header files. 10 | 11 | #ifndef MUDUO_NET_ENDIAN_H 12 | #define MUDUO_NET_ENDIAN_H 13 | 14 | #include 15 | #include 16 | 17 | namespace muduo { 18 | namespace net { 19 | namespace sockets { 20 | 21 | inline uint64_t hostToNetwork64(uint64_t host64) { 22 | return htobe64(host64); 23 | } 24 | 25 | inline uint32_t hostToNetwork32(uint32_t host32) { 26 | return htobe32(host32); 27 | } 28 | 29 | inline uint16_t hostToNetwork16(uint16_t host16) { 30 | return htobe16(host16); 31 | } 32 | 33 | inline uint64_t networkToHost64(uint64_t net64) { 34 | return be64toh(net64); 35 | } 36 | 37 | inline uint32_t networkToHost32(uint32_t net32) { 38 | return be32toh(net32); 39 | } 40 | 41 | inline uint16_t networkToHost16(uint16_t net16) { 42 | return be16toh(net16); 43 | } 44 | 45 | } 46 | } 47 | } 48 | 49 | #endif // MUDUO_NET_ENDIAN_H 50 | -------------------------------------------------------------------------------- /WechatBySimple/wrapper/src/main/java/com/tencent/mars/wrapper/remote/MarsTaskProperty.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Tencent is pleased to support the open source community by making Mars available. 3 | * Copyright (C) 2016 THL A29 Limited, a Tencent company. All rights reserved. 4 | * 5 | * Licensed under the MIT License (the "License"); you may not use this file except in 6 | * compliance with the License. You may obtain a copy of the License at 7 | * http://opensource.org/licenses/MIT 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 11 | * either express or implied. See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | package com.tencent.mars.wrapper.remote; 16 | 17 | /** 18 | * Constants for Mars Task properties 19 | *

20 | * Created by zhaoyuan on 16/2/29. 21 | */ 22 | public final class MarsTaskProperty { 23 | 24 | private MarsTaskProperty() { 25 | 26 | } 27 | 28 | public static final String OPTIONS_HOST = "host"; 29 | public static final String OPTIONS_CGI_PATH = "cgi_path"; 30 | public static final String OPTIONS_CMD_ID = "cmd_id"; 31 | public static final String OPTIONS_CHANNEL_SHORT_SUPPORT = "short_support"; 32 | public static final String OPTIONS_CHANNEL_LONG_SUPPORT = "long_support"; 33 | public static final String OPTIONS_TASK_ID = "task_id"; 34 | } 35 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/model/ConversationItemModel.java: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.model; 2 | 3 | public class ConversationItemModel { 4 | 5 | private String portraitUrl; 6 | 7 | private String title; 8 | 9 | private String content; 10 | 11 | private String date; 12 | 13 | private int conversationType; 14 | 15 | private int targetId; 16 | 17 | public String getPortraitUrl() { 18 | return portraitUrl; 19 | } 20 | 21 | public void setPortraitUrl(String portraitUrl) { 22 | this.portraitUrl = portraitUrl; 23 | } 24 | 25 | public String getTitle() { 26 | return title; 27 | } 28 | 29 | public void setTitle(String title) { 30 | this.title = title; 31 | } 32 | 33 | public int getConversationType() { 34 | return conversationType; 35 | } 36 | 37 | public void setConversationType(int conversationType) { 38 | this.conversationType = conversationType; 39 | } 40 | 41 | public int getTargetId() { 42 | return targetId; 43 | } 44 | 45 | public void setTargetId(int targetId) { 46 | this.targetId = targetId; 47 | } 48 | 49 | public String getContent() { 50 | return content; 51 | } 52 | 53 | public void setContent(String content) { 54 | this.content = content; 55 | } 56 | 57 | public String getDate() { 58 | return date; 59 | } 60 | 61 | public void setDate(String date) { 62 | this.date = date; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /WechatBySimple/wrapper/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.4.1) 2 | 3 | set(CMAKE_VERBOSE_MAKEFILE on) 4 | set(distribution_DIR ${CMAKE_SOURCE_DIR}/../protobuf) 5 | set(SRC_DIR ./src/main/cpp) 6 | 7 | SET(CMAKE_C_COMPILER g++) 8 | add_compile_options(-std=c++11) 9 | 10 | include_directories(${distribution_DIR}/include) 11 | include_directories(${SRC_DIR}) 12 | 13 | add_library(buffer ./src/main/cpp/muduo/Buffer.cc) 14 | 15 | add_library( # Sets the name of the library. 16 | native-lib 17 | 18 | # Sets the library as a shared library. 19 | SHARED 20 | 21 | # Provides a relative path to your source file(s). 22 | ./src/main/cpp/native-lib.cpp) 23 | 24 | # Searches for a specified prebuilt library and stores the path as a 25 | # variable. Because CMake includes system libraries in the search path by 26 | # default, you only need to specify the name of the public NDK library 27 | # you want to add. CMake verifies that the library exists before 28 | # completing its build. 29 | 30 | find_library( # Sets the name of the path variable. 31 | log-lib 32 | 33 | # Specifies the name of the NDK library that 34 | # you want CMake to locate. 35 | log) 36 | 37 | # Specifies libraries CMake should link to your target library. You 38 | # can link multiple libraries, such as libraries you define in this 39 | # build script, prebuilt third-party libraries, or system libraries. 40 | 41 | target_link_libraries( # Specifies the target library. 42 | native-lib 43 | z 44 | buffer 45 | ) -------------------------------------------------------------------------------- /WechatBySimple/wrapper/src/main/java/com/tencent/mars/wrapper/task/LoginTaskWrapper.java: -------------------------------------------------------------------------------- 1 | package com.tencent.mars.wrapper.task; 2 | 3 | import com.google.protobuf.InvalidProtocolBufferException; 4 | import com.proto.imlib.Muduo; 5 | import com.tencent.mars.stn.StnLogic; 6 | import com.tencent.mars.wrapper.TaskProperty; 7 | import com.tencent.mars.wrapper.remote.NanoMarsTaskWrapper; 8 | 9 | @TaskProperty( 10 | host = "localhost", 11 | path = "/mars/sendmessage", 12 | cmdID = 10001, 13 | longChannelSupport = true, 14 | shortChannelSupport = false 15 | ) 16 | public class LoginTaskWrapper extends NanoMarsTaskWrapper { 17 | 18 | private int mUserId; 19 | 20 | public LoginTaskWrapper(int userId) { 21 | super(); 22 | mUserId = userId; 23 | } 24 | 25 | @Override 26 | public Muduo.LoginRequest.Builder onPreEncode() { 27 | return Muduo.LoginRequest.newBuilder().setUserId(mUserId); 28 | } 29 | 30 | @Override 31 | public Muduo.Response onBufDecode(byte[] buf) throws InvalidProtocolBufferException { 32 | return Muduo.Response.parseFrom(buf); 33 | } 34 | 35 | @Override 36 | public void onPostDecode(Muduo.Response response) { 37 | 38 | } 39 | 40 | @Override 41 | public void onTaskEnd(int errType, int errCode) { 42 | if (errCode == StnLogic.RESP_FAIL_HANDLE_NORMAL) { 43 | 44 | } 45 | } 46 | 47 | @Override 48 | public String typeName() { 49 | return "muduo.LoginRequest"; 50 | } 51 | } -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/util/EditTextBySimple.java: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.util; 2 | 3 | import android.content.Context; 4 | import android.support.v7.widget.AppCompatEditText; 5 | import android.util.AttributeSet; 6 | import android.view.KeyEvent; 7 | 8 | /** 9 | * 拦截键盘向下的 EditTextView 10 | */ 11 | public class EditTextBySimple extends AppCompatEditText { 12 | public EditTextBySimple(Context context) { 13 | super(context); 14 | } 15 | 16 | public EditTextBySimple(Context context, AttributeSet attrs) { 17 | super(context, attrs); 18 | } 19 | 20 | public EditTextBySimple(Context context, AttributeSet attrs, int defStyleAttr) { 21 | super(context, attrs, defStyleAttr); 22 | } 23 | 24 | 25 | @Override 26 | public boolean onKeyPreIme(int keyCode, KeyEvent event) { 27 | if (keyCode == KeyEvent.KEYCODE_BACK && event.getAction() == 1) { 28 | super.onKeyPreIme(keyCode, event); 29 | onKeyBoardHideListener.onKeyHide(keyCode, event); 30 | return false; 31 | } 32 | return super.onKeyPreIme(keyCode, event); 33 | } 34 | 35 | /** 36 | * 键盘监听接口 37 | */ 38 | OnKeyBoardHideListener onKeyBoardHideListener; 39 | 40 | public void setOnKeyBoardHideListener(OnKeyBoardHideListener onKeyBoardHideListener) { 41 | this.onKeyBoardHideListener = onKeyBoardHideListener; 42 | } 43 | 44 | public interface OnKeyBoardHideListener { 45 | void onKeyHide(int keyCode, KeyEvent event); 46 | } 47 | } 48 | 49 | -------------------------------------------------------------------------------- /WechatBySimple/wrapper/src/main/java/com/tencent/mars/wrapper/TaskProperty.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Tencent is pleased to support the open source community by making Mars available. 3 | * Copyright (C) 2016 THL A29 Limited, a Tencent company. All rights reserved. 4 | * 5 | * Licensed under the MIT License (the "License"); you may not use this file except in 6 | * compliance with the License. You may obtain a copy of the License at 7 | * http://opensource.org/licenses/MIT 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 11 | * either express or implied. See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | package com.tencent.mars.wrapper; 16 | 17 | import java.lang.annotation.Documented; 18 | import java.lang.annotation.ElementType; 19 | import java.lang.annotation.Inherited; 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.RetentionPolicy; 22 | import java.lang.annotation.Target; 23 | 24 | /** 25 | * Define task property 26 | *

27 | * Created by zhaoyuan on 16/2/29. 28 | */ 29 | @Retention(RetentionPolicy.RUNTIME) 30 | @Target(ElementType.TYPE) 31 | @Documented 32 | @Inherited 33 | public @interface TaskProperty { 34 | 35 | String host() default ""; 36 | 37 | String path(); 38 | 39 | boolean shortChannelSupport() default true; 40 | 41 | boolean longChannelSupport() default false; 42 | 43 | int cmdID() default -1; 44 | } 45 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/util/ListBindingsUtil.kt: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.util 2 | 3 | import android.databinding.BindingAdapter 4 | import android.support.v7.widget.RecyclerView 5 | import android.widget.HeaderViewListAdapter 6 | import android.widget.ListView 7 | import com.lqr.recyclerview.LQRRecyclerView 8 | import com.simple.wechatsimple.contacts.ContactAdapter 9 | import com.simple.wechatsimple.model.BaseMessageItemModel 10 | import com.simple.wechatsimple.model.ContactItemModel 11 | import com.simple.wechatsimple.model.ConversationItemModel 12 | import com.simple.wechatsimple.recent.RecentMessageAdapter 13 | import com.simple.wechatsimple.session.SessionAdapter 14 | 15 | object ListBindingsUtil { 16 | 17 | @BindingAdapter("app:items") 18 | @JvmStatic 19 | fun setItems(listView: ListView, data: List) { 20 | val hAdapter = listView.adapter as HeaderViewListAdapter 21 | with(hAdapter.wrappedAdapter as ContactAdapter) { 22 | setData(data) 23 | } 24 | } 25 | 26 | @BindingAdapter("app:items") 27 | @JvmStatic 28 | fun setItems(recyclerView: RecyclerView, data: List) { 29 | with(recyclerView.adapter as SessionAdapter) { 30 | setData(data) 31 | } 32 | 33 | } 34 | 35 | @BindingAdapter("app:items") 36 | @JvmStatic 37 | fun setItems(recyclerView: LQRRecyclerView, data: List) { 38 | with(recyclerView.adapter as RecentMessageAdapter) { 39 | setData(data) 40 | } 41 | } 42 | 43 | 44 | } -------------------------------------------------------------------------------- /WechatBySimple/wrapper/src/main/java/com/tencent/mars/utils/print/BundleFormat.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Tencent is pleased to support the open source community by making Mars available. 3 | * Copyright (C) 2016 THL A29 Limited, a Tencent company. All rights reserved. 4 | * 5 | * Licensed under the MIT License (the "License"); you may not use this file except in 6 | * compliance with the License. You may obtain a copy of the License at 7 | * http://opensource.org/licenses/MIT 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 11 | * either express or implied. See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | package com.tencent.mars.utils.print; 16 | 17 | import android.os.Bundle; 18 | 19 | import java.util.Set; 20 | 21 | /** 22 | * Print bundle values 23 | *

24 | * Created by zhaoyuan on 16/2/29. 25 | */ 26 | public class BundleFormat { 27 | 28 | public static String toString(Bundle bundle) { 29 | final StringBuilder sb = new StringBuilder("{"); 30 | 31 | Set keys = bundle.keySet(); 32 | for (String k : keys) { 33 | Object obj = bundle.get(k); 34 | if (obj instanceof Bundle) { 35 | sb.append(toString((Bundle) obj)); 36 | 37 | } else { 38 | sb.append(k).append("=").append(obj).append("; "); 39 | } 40 | } 41 | 42 | return sb.append("}").toString(); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/util/DisplayUtil.java: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.util; 2 | 3 | import android.content.Context; 4 | 5 | /** 6 | * Created by shuangfeng on 17/3/17. 7 | * DisplayUtil 8 | */ 9 | public class DisplayUtil { 10 | 11 | private static int mStatusBarHeight = 0; 12 | 13 | public static int px2dp(Context context, float pxValue) { 14 | float density = context.getResources().getDisplayMetrics().density;//得到设备的密度 15 | return (int) (pxValue / density + 0.5f); 16 | } 17 | 18 | public static int dp2px(Context context, float dpValue) { 19 | float density = context.getResources().getDisplayMetrics().density; 20 | return (int) (dpValue * density + 0.5f); 21 | } 22 | 23 | public static int px2sp(Context context, float pxValue) { 24 | float scaleDensity = context.getResources().getDisplayMetrics().scaledDensity;//缩放密度 25 | return (int) (pxValue / scaleDensity + 0.5f); 26 | } 27 | 28 | public static int sp2px(Context context, float spValue) { 29 | float scaleDensity = context.getResources().getDisplayMetrics().scaledDensity; 30 | return (int) (spValue * scaleDensity + 0.5f); 31 | } 32 | 33 | public static int getStatusBarHeight(Context context) { 34 | if (mStatusBarHeight == 0) { 35 | int resourceId = context.getResources().getIdentifier("status_bar_height", "dimen", "android"); 36 | mStatusBarHeight = context.getResources().getDimensionPixelSize(resourceId); 37 | } 38 | // 获得状态栏高度 39 | return mStatusBarHeight; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /WechatBySimple/imlib/src/main/java/com/simple/imlib/task/HistoryTaskWrapper.java: -------------------------------------------------------------------------------- 1 | package com.simple.imlib.task; 2 | 3 | import com.google.protobuf.InvalidProtocolBufferException; 4 | import com.proto.imlib.Muduo; 5 | import com.tencent.mars.stn.StnLogic; 6 | import com.tencent.mars.wrapper.TaskProperty; 7 | import com.tencent.mars.wrapper.remote.NanoMarsTaskWrapper; 8 | 9 | @TaskProperty( 10 | host = "localhost", 11 | path = "", 12 | cmdID = 10009, 13 | longChannelSupport = true, 14 | shortChannelSupport = false 15 | ) 16 | public class HistoryTaskWrapper extends NanoMarsTaskWrapper { 17 | 18 | private int id; 19 | 20 | public HistoryTaskWrapper(int id) { 21 | super(); 22 | this.id = id; 23 | } 24 | 25 | @Override 26 | public Muduo.HistoryMessage.Builder onPreEncode() { 27 | Muduo.HistoryMessage.Builder builder = Muduo.HistoryMessage.newBuilder() 28 | .setId(id); 29 | 30 | return builder; 31 | } 32 | 33 | @Override 34 | public Muduo.Response onBufDecode(byte[] buf) throws InvalidProtocolBufferException { 35 | return Muduo.Response.parseFrom(buf); 36 | } 37 | 38 | @Override 39 | public void onPostDecode(Muduo.Response response) { 40 | 41 | } 42 | 43 | @Override 44 | public void onTaskEnd(int errType, int errCode) { 45 | if (errCode == StnLogic.RESP_FAIL_HANDLE_NORMAL) { 46 | 47 | } 48 | } 49 | 50 | @Override 51 | public String typeName() { 52 | return "muduo.HistoryMessage"; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /IMServer/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.6) 2 | 3 | set(PROTOBUF_INCLUDE "/usr/local/protobuf/include") 4 | include_directories(${PROTOBUF_INCLUDE}) 5 | 6 | set(MUDUO_INCLUDE "/root/Downloads/build/release-install/include") 7 | set(MUDUO_LIB "/root/Downloads/build/release-install/lib") 8 | 9 | set(MYSQLPP_INCLUDE "/usr/local/include/mysql++") 10 | set(MYSQLPP_LIB "/usr/local/lib") 11 | 12 | set(MYSQL_INCLUDE "/usr/include/mysql") 13 | set(MYSQL_LIB "/usr/lib64/mysql") 14 | 15 | include_directories(${MUDUO_INCLUDE}) 16 | link_directories(${MUDUO_LIB}) 17 | 18 | set(ZLIB_INCLUDE "/usr/local/zlib/include") 19 | set(ZLIB_LIB "/usr/local/zlib/lib") 20 | 21 | include_directories(${ZLIB_INCLUDE}) 22 | link_directories(${ZLIB_LIB}) 23 | 24 | include_directories(${MYSQLPP_INCLUDE}) 25 | link_directories(${MYSQLPP_LIB}) 26 | 27 | include_directories(${MYSQL_INCLUDE}) 28 | link_directories(${MYSQL_LIB}) 29 | 30 | add_custom_command(OUTPUT query.pb.cc query.pb.h 31 | COMMAND protoc 32 | ARGS --cpp_out . ${CMAKE_CURRENT_SOURCE_DIR}/query.proto -I${CMAKE_CURRENT_SOURCE_DIR} 33 | DEPENDS query.proto 34 | VERBATIM ) 35 | 36 | set_source_files_properties(query.pb.cc PROPERTIES COMPILE_FLAGS "-Wno-conversion -Wno-shadow") 37 | include_directories(${PROJECT_BINARY_DIR}) 38 | 39 | add_library(query_proto query.pb.cc) 40 | target_link_libraries(query_proto protobuf pthread) 41 | 42 | add_library(protobuf_codec codec.cc) 43 | target_link_libraries(protobuf_codec protobuf muduo_base muduo_net z) 44 | 45 | add_executable(protobuf_server server.cc) 46 | set_target_properties(protobuf_server PROPERTIES COMPILE_FLAGS "-Wno-error=shadow") 47 | target_link_libraries(protobuf_server protobuf_codec query_proto mysqlclient mysqlpp) 48 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/recent/RecentFragment.kt: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.recent 2 | 3 | import android.arch.lifecycle.Observer 4 | import android.os.Bundle 5 | import android.support.v7.widget.LinearLayoutManager 6 | import android.view.LayoutInflater 7 | import android.view.View 8 | import android.view.ViewGroup 9 | import com.simple.wechatsimple.base.BaseFragment 10 | import com.simple.wechatsimple.databinding.FragmentRecentMessageBinding 11 | import com.simple.wechatsimple.main.MainActivity 12 | 13 | class RecentFragment : BaseFragment() { 14 | 15 | private lateinit var viewDataBinding: FragmentRecentMessageBinding 16 | 17 | override fun onCreateView(inflater: LayoutInflater, 18 | container: ViewGroup?, 19 | savedInstanceState: Bundle?): View? { 20 | viewDataBinding = FragmentRecentMessageBinding.inflate(inflater, container, false) 21 | .apply { 22 | recent = (activity as MainActivity).obtainRecentViewModel() 23 | mViewModelView = recent 24 | 25 | recent!!.refreshAdapterSingleLiveEvent.observe(activity!!, Observer { 26 | viewDataBinding.rvRecentMessage.adapter!!.notifyDataSetChanged() 27 | }) 28 | } 29 | 30 | viewDataBinding.rvRecentMessage.layoutManager = LinearLayoutManager(activity) 31 | viewDataBinding.rvRecentMessage.adapter = RecentMessageAdapter(activity!!) 32 | 33 | return viewDataBinding.root 34 | } 35 | 36 | override fun onViewCreated(view: View, savedInstanceState: Bundle?) { 37 | super.onViewCreated(view, savedInstanceState) 38 | (mViewModelView as RecentViewModel).getHistory() 39 | } 40 | } -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/recent/RecentMessageAdapter.kt: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.recent 2 | 3 | import android.content.Context 4 | import android.content.Intent 5 | import android.os.Bundle 6 | import com.simple.imlib.constant.Constant 7 | import com.simple.wechatsimple.R 8 | import com.simple.wechatsimple.base.BaseBindingAdapter 9 | import com.simple.wechatsimple.databinding.ItemRecentMessageBinding 10 | import com.simple.wechatsimple.model.ConversationItemModel 11 | import com.simple.wechatsimple.session.SessionActivity 12 | 13 | class RecentMessageAdapter(context: Context) : 14 | BaseBindingAdapter(context) { 15 | 16 | override fun getLayoutResId(viewType: Int) = R.layout.item_recent_message 17 | 18 | override fun onBindItem(binding: ItemRecentMessageBinding, item: ConversationItemModel) { 19 | binding.item = item 20 | binding.itemListener = onItemClickListener 21 | binding.executePendingBindings() 22 | } 23 | 24 | val onItemClickListener = object : OnItemClickListener { 25 | override fun onItem(item: ConversationItemModel) { 26 | val intent = Intent().apply { 27 | 28 | val bundle = Bundle() 29 | bundle.putInt("targetId", item.targetId) 30 | if (item.conversationType == Constant.PRIVATE_MESSAGE) { 31 | bundle.putInt("conversationType", Constant.PRIVATE_MESSAGE) 32 | } 33 | putExtras(bundle) 34 | 35 | setClass(context, SessionActivity::class.java) 36 | } 37 | context!!.startActivity(intent) 38 | } 39 | } 40 | 41 | interface OnItemClickListener { 42 | fun onItem(item: ConversationItemModel) 43 | } 44 | } -------------------------------------------------------------------------------- /WechatBySimple/wrapper/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'maven' 2 | apply plugin: 'com.android.library' 3 | apply plugin: 'com.google.protobuf' 4 | 5 | android { 6 | compileSdkVersion 28 7 | buildToolsVersion '28.0.3' 8 | 9 | defaultConfig { 10 | minSdkVersion 16 11 | targetSdkVersion 28 12 | versionCode 1 13 | versionName "1.0" 14 | externalNativeBuild { 15 | cmake { 16 | cppFlags "-std=c++11" 17 | } 18 | } 19 | } 20 | externalNativeBuild { 21 | cmake { 22 | path "CMakeLists.txt" 23 | } 24 | } 25 | sourceSets { 26 | main { 27 | 28 | proto { 29 | //main目录新建proto目录 30 | srcDir 'src/main/proto' 31 | } 32 | java { 33 | srcDir 'src/main/java' 34 | } 35 | } 36 | } 37 | buildTypes { 38 | release { 39 | minifyEnabled false 40 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 41 | } 42 | } 43 | } 44 | 45 | protobuf { 46 | //配置protoc编译器 47 | protoc { 48 | artifact = 'com.google.protobuf:protoc:3.5.1' 49 | } 50 | //这里配置生成目录,编译后会在build的目录下生成对应的java文件 51 | generateProtoTasks { 52 | all().each { task -> 53 | task.builtins { 54 | remove java 55 | } 56 | task.builtins { 57 | java {} 58 | } 59 | } 60 | } 61 | } 62 | 63 | dependencies { 64 | implementation fileTree(dir: 'libs', include: ['*.jar']) 65 | implementation 'com.google.code.gson:gson:2.8.5' 66 | implementation "com.tencent.mars:mars-core:1.2.1" 67 | implementation 'com.google.protobuf:protobuf-java:3.5.1' 68 | } 69 | -------------------------------------------------------------------------------- /WechatBySimple/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | ext { 3 | // Sdk and tools 4 | minSdkVersion = 14 5 | targetSdkVersion = 28 6 | compileSdkVersion = 28 7 | 8 | buildToolsVersion = '28.0.0-alpha3' 9 | 10 | // App dependencies 11 | supportLibraryVersion = '28.0.0-alpha3' 12 | guavaVersion = '22.0-android' 13 | junitVersion = '4.12' 14 | mockitoVersion = '2.8.47' 15 | hamcrestVersion = '1.3' 16 | runnerVersion = '1.0.1' 17 | rulesVersion = '1.0.1' 18 | espressoVersion = '3.0.1' 19 | roomVersion = "1.1.1" 20 | glideVersion = '4.8.0' 21 | rxJavaVersion = '2.2.0' 22 | rxAndroidVersion = '2.1.0' 23 | 24 | // Architecture Components dependencies 25 | archLifecycleVersion = "1.1.1" 26 | } 27 | 28 | buildscript { 29 | ext.kotlin_version = '1.3.11' 30 | ext.kotlin_version = '1.3.11' 31 | repositories { 32 | google() 33 | jcenter() 34 | } 35 | dependencies { 36 | classpath 'com.android.tools.build:gradle:3.3.0' 37 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 38 | classpath "io.realm:realm-gradle-plugin:5.7.0" 39 | classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.6' 40 | // NOTE: Do not place your application dependencies here; they belong 41 | // in the individual module build.gradle files 42 | } 43 | } 44 | 45 | allprojects { 46 | repositories { 47 | google() 48 | jcenter() 49 | maven { 50 | url 'https://www.jitpack.io' 51 | } 52 | maven { 53 | url 'http://oss.jfrog.org/artifactory/oss-snapshot-local' 54 | } 55 | } 56 | } 57 | 58 | task clean(type: Delete) { 59 | delete rootProject.buildDir 60 | } 61 | -------------------------------------------------------------------------------- /WechatBySimple/wrapper/src/main/java/com/tencent/mars/wrapper/service/DebugMarsServiceProfile.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Tencent is pleased to support the open source community by making Mars available. 3 | * Copyright (C) 2016 THL A29 Limited, a Tencent company. All rights reserved. 4 | * 5 | * Licensed under the MIT License (the "License"); you may not use this file except in 6 | * compliance with the License. You may obtain a copy of the License at 7 | * http://opensource.org/licenses/MIT 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 11 | * either express or implied. See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | package com.tencent.mars.wrapper.service; 16 | 17 | /** 18 | * Default profile for testing. 19 | *

20 | * Created by zhaoyuan on 2016/11/16. 21 | */ 22 | 23 | public class DebugMarsServiceProfile implements MarsServiceProfile { 24 | 25 | public static final short MAGIC = 0x0110; 26 | public static final short PRODUCT_ID = 200; 27 | public static final String LONG_LINK_HOST = "localhost"; 28 | public static final int[] LONG_LINK_PORTS = new int[]{8081}; 29 | public static final int SHORT_LINK_PORT = 8080; 30 | 31 | @Override 32 | public short magic() { 33 | return MAGIC; 34 | } 35 | 36 | @Override 37 | public short productID() { 38 | return PRODUCT_ID; 39 | } 40 | 41 | @Override 42 | public String longLinkHost() { 43 | return LONG_LINK_HOST; 44 | } 45 | 46 | @Override 47 | public int[] longLinkPorts() { 48 | return LONG_LINK_PORTS; 49 | } 50 | 51 | @Override 52 | public int shortLinkPort() { 53 | return SHORT_LINK_PORT; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /WechatBySimple/imlib/src/main/java/com/simple/imlib/handler/MessageHandler.java: -------------------------------------------------------------------------------- 1 | package com.simple.imlib.handler; 2 | 3 | import android.content.ComponentName; 4 | import android.content.Context; 5 | import android.content.Intent; 6 | import android.os.Bundle; 7 | import android.util.Log; 8 | 9 | import com.proto.imlib.Muduo; 10 | import com.simple.imlib.constant.Constant; 11 | import com.tencent.mars.wrapper.remote.PackageUtils; 12 | import com.tencent.mars.wrapper.remote.PushMessage; 13 | 14 | public class MessageHandler extends BusinessHandler { 15 | private Context context; 16 | 17 | public MessageHandler(Context context) { 18 | this.context = context; 19 | } 20 | 21 | @Override 22 | public boolean handlerReceivedMessage(PushMessage pushMessage) { 23 | Log.i("MessageHandler", "handlerReceivedMessage"); 24 | if (pushMessage.cmdId == Constant.MESSAGE_CMDID) { 25 | try { 26 | Log.i("MessageHandler", "unpackData"); 27 | byte[] responseData = PackageUtils.unpackData(pushMessage.buffer); 28 | Log.i("MessageHandler", "parseData"); 29 | Muduo.IMMessage message = Muduo.IMMessage.parseFrom(responseData); 30 | 31 | Intent intent = new Intent(); 32 | intent.setAction(Constant.MESSAGE_ACTION); 33 | 34 | Bundle bundle = new Bundle(); 35 | bundle.putSerializable("message", message); 36 | intent.putExtras(bundle); 37 | 38 | intent.setComponent(new ComponentName(Constant.PACKAGE_NAME, Constant.CLS)); 39 | context.sendBroadcast(intent); 40 | } catch (Exception e) { 41 | Log.i("VoiceMessageHandler", e.getMessage()); 42 | return false; 43 | } 44 | return true; 45 | } 46 | return false; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /WechatBySimple/uploadservice/src/main/java/com/simple/upload/schemehandlers/SchemeHandlerFactory.java: -------------------------------------------------------------------------------- 1 | package com.simple.upload.schemehandlers; 2 | 3 | import java.lang.reflect.InvocationTargetException; 4 | import java.util.LinkedHashMap; 5 | import java.util.Map; 6 | 7 | /** 8 | * Factory which instantiates the proper scheme handler based on the scheme passed. 9 | * @author gotev 10 | */ 11 | public class SchemeHandlerFactory { 12 | 13 | private static class LazyHolder { 14 | private static final SchemeHandlerFactory INSTANCE = new SchemeHandlerFactory(); 15 | } 16 | 17 | public static SchemeHandlerFactory getInstance() { 18 | return LazyHolder.INSTANCE; 19 | } 20 | 21 | private LinkedHashMap> handlers = new LinkedHashMap<>(); 22 | 23 | private SchemeHandlerFactory() { 24 | handlers.put("/", FileSchemeHandler.class); 25 | handlers.put("content://", ContentSchemeHandler.class); 26 | } 27 | 28 | public SchemeHandler get(String path) 29 | throws NoSuchMethodException, IllegalAccessException, 30 | InvocationTargetException, InstantiationException { 31 | 32 | for (Map.Entry> handler : handlers.entrySet()) { 33 | if (path.startsWith(handler.getKey())) { 34 | SchemeHandler schemeHandler = handler.getValue().newInstance(); 35 | schemeHandler.init(path); 36 | return schemeHandler; 37 | } 38 | } 39 | 40 | throw new UnsupportedOperationException("No handlers for " + path); 41 | } 42 | 43 | public boolean isSupported(String path) { 44 | for (String scheme : handlers.keySet()) { 45 | if (path.startsWith(scheme)) 46 | return true; 47 | } 48 | 49 | return false; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /IMApiServer/CJsonObjectBase.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by root on 10/6/18. 3 | // 4 | 5 | #ifndef IMAPISERVER_CJSONOBJECTBASE_H 6 | #define IMAPISERVER_CJSONOBJECTBASE_H 7 | #ifndef JSONHANDLE_CJSONOBJECTBASE_H_ 8 | #define JSONHANDLE_CJSONOBJECTBASE_H_ 9 | 10 | #include 11 | #include 12 | #include 13 | #include "json/json.h" 14 | 15 | /* 各种json对象的标识 */ 16 | typedef enum { 17 | asBool = 1, 18 | asInt16, 19 | asInt, 20 | asUInt, 21 | asString, 22 | asInt64, 23 | asUInt64, 24 | asJsonObj, //复杂对象 25 | asArray, //数组 26 | jsonNum //标识数 27 | } E_JsonType; 28 | 29 | class CJsonObjectBase { 30 | public: 31 | CJsonObjectBase(); 32 | 33 | virtual ~CJsonObjectBase(); 34 | 35 | public: 36 | std::string Serialize(); /* 序列化为json结构 */ 37 | bool DeSerialize(const char *str); /* 反序列化为内存变量 */ 38 | 39 | Json::Value DoArraySerialize(std::vector *pList); /* 对数组结构进行 */ 40 | void SetProperty(std::string name, E_JsonType type, void *addr); 41 | 42 | void SetPropertyObj(std::string name, E_JsonType type, void *addr, E_JsonType listParamType = asInt); 43 | 44 | private: 45 | Json::Value DoSerialize(); 46 | 47 | bool DoDeSerialize(Json::Value &root); 48 | 49 | bool DoObjArrayDeSerialize(const std::string &propertyName, void *addr, Json::Value &node); 50 | 51 | virtual CJsonObjectBase *GenerateJsonObjForDeSerialize(const std::string &propertyName) { 52 | return NULL; 53 | }; 54 | 55 | virtual void SetPropertys() = 0; 56 | 57 | private: 58 | std::vector m_listName; 59 | std::vector m_listPropertyAddr; 60 | std::vector m_listType; 61 | std::vector m_listParamType; 62 | }; 63 | 64 | #endif /* JSONHANDLE_CJSONOBJECTBASE_H_ */ 65 | 66 | #endif //IMAPISERVER_CJSONOBJECTBASE_H 67 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/res/layout/view_actionsheet.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 22 | 23 | 29 | 30 | 35 | 36 | 37 | 38 | 49 | 50 | -------------------------------------------------------------------------------- /WechatBySimple/wrapper/src/main/java/com/tencent/mars/utils/print/MemoryDump.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Tencent is pleased to support the open source community by making Mars available. 3 | * Copyright (C) 2016 THL A29 Limited, a Tencent company. All rights reserved. 4 | * 5 | * Licensed under the MIT License (the "License"); you may not use this file except in 6 | * compliance with the License. You may obtain a copy of the License at 7 | * http://opensource.org/licenses/MIT 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 11 | * either express or implied. See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | package com.tencent.mars.utils.print; 16 | 17 | /** 18 | * Created by zhaoyuan on 2016/11/17. 19 | */ 20 | 21 | public class MemoryDump { 22 | 23 | public static final int MASK_4BIT = 0x0F; 24 | public static final int MASK_8BIT = 0xFF; 25 | public static final int MASK_16BIT = 0xFFFF; 26 | public static final int MASK_32BIT = 0xFFFFFFFF; 27 | 28 | public static String dumpHex(final byte[] privateKey) { 29 | if (privateKey == null) { 30 | return "(null)"; 31 | } 32 | 33 | final char[] hexDigits = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'}; 34 | 35 | final int j = privateKey.length; 36 | final int cHexWidth = 3; 37 | final char[] str = new char[j * cHexWidth]; 38 | int k = 0; 39 | for (int i = 0; i < j; i++) { 40 | final byte byte0 = privateKey[i]; 41 | str[k++] = ' '; 42 | str[k++] = hexDigits[byte0 >>> 4 & MASK_4BIT]; 43 | str[k++] = hexDigits[byte0 & MASK_4BIT]; 44 | } 45 | return new String(str); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/base/SingleLiveEvent.kt: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.base 2 | 3 | import android.arch.lifecycle.LifecycleOwner 4 | import android.arch.lifecycle.MutableLiveData 5 | import android.arch.lifecycle.Observer 6 | import android.support.annotation.MainThread 7 | import android.util.Log 8 | 9 | import java.util.concurrent.atomic.AtomicBoolean 10 | 11 | /** 12 | * A lifecycle-aware observable that sends only new updates after subscription, used for events like 13 | * navigation and Snackbar messages. 14 | * 15 | * 16 | * This avoids a common problem with events: on configuration change (like rotation) an update 17 | * can be emitted if the observer is active. This LiveData only calls the observable if there's an 18 | * explicit call to setValue() or call(). 19 | * 20 | * 21 | * Note that only one observer is going to be notified of changes. 22 | */ 23 | class SingleLiveEvent : MutableLiveData() { 24 | 25 | private val pending = AtomicBoolean(false) 26 | 27 | @MainThread 28 | override fun observe(owner: LifecycleOwner, observer: Observer) { 29 | 30 | if (hasActiveObservers()) { 31 | Log.w(TAG, "Multiple observers registered but only one will be notified of changes.") 32 | } 33 | 34 | // Observe the internal MutableLiveData 35 | super.observe(owner, Observer { t -> 36 | if (pending.compareAndSet(true, false)) { 37 | observer.onChanged(t) 38 | } 39 | }) 40 | } 41 | 42 | @MainThread 43 | override fun setValue(t: T?) { 44 | pending.set(true) 45 | super.setValue(t) 46 | } 47 | 48 | /** 49 | * Used for cases where T is Void, to make calls cleaner. 50 | */ 51 | @MainThread 52 | fun call() { 53 | value = null 54 | } 55 | 56 | companion object { 57 | private const val TAG = "SingleLiveEvent" 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/base/BaseFragment.kt: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.base 2 | 3 | import android.arch.lifecycle.Observer 4 | import android.os.Bundle 5 | import android.support.v4.app.Fragment 6 | import android.support.v7.app.AppCompatActivity 7 | import android.view.View 8 | import com.android.tu.loadingdialog.LoadingDailog 9 | import com.simple.wechatsimple.component.AlertDialog 10 | 11 | 12 | open class BaseFragment : Fragment() { 13 | protected var mViewModelView: BaseModelView? = null 14 | 15 | private var mLoadingDialog: LoadingDailog? = null 16 | 17 | override fun onViewCreated(view: View, savedInstanceState: Bundle?) { 18 | super.onViewCreated(view, savedInstanceState) 19 | 20 | val loadBuilder = LoadingDailog.Builder(activity) 21 | .setMessage("加载中...") 22 | .setCancelable(true) 23 | .setCancelOutside(true) 24 | mLoadingDialog = loadBuilder.create() 25 | 26 | mViewModelView!!.showLoadingEvent.observe(activity as AppCompatActivity, Observer { 27 | showLoadingDialog() 28 | }) 29 | 30 | mViewModelView!!.hideLoadingEvent.observe(activity as AppCompatActivity, Observer { 31 | hideLoadingDialog() 32 | }) 33 | 34 | mViewModelView!!.showMessageEvent.observe(activity as AppCompatActivity, Observer { 35 | showMessage(it!!) 36 | }) 37 | } 38 | 39 | private fun showLoadingDialog() { 40 | mLoadingDialog!!.show() 41 | } 42 | 43 | private fun hideLoadingDialog() { 44 | if (mLoadingDialog!!.isShowing) { 45 | mLoadingDialog!!.dismiss() 46 | } 47 | } 48 | 49 | protected fun showMessage(message: String) { 50 | AlertDialog(activity) 51 | .builder() 52 | .setMsg(message) 53 | .setPositiveButton("确定") { 54 | } 55 | .show() 56 | } 57 | } -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/util/ImageViewAttrBindings.kt: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.util 2 | 3 | import android.databinding.BindingAdapter 4 | import android.graphics.drawable.Drawable 5 | import android.text.TextUtils 6 | import android.widget.ImageView 7 | import com.bumptech.glide.Glide 8 | import com.bumptech.glide.request.RequestOptions 9 | 10 | object ImageViewAttrBindings { 11 | @BindingAdapter(value = arrayOf("app:imageUrl", "app:placeHolder", "app:error"), requireAll = false) 12 | @JvmStatic 13 | fun loadImage(imageView: ImageView, url: String, holderDrawable: Drawable, errorDrawable: Drawable) { 14 | if (TextUtils.isEmpty(url)) { 15 | return 16 | } 17 | Glide.with(imageView.context) 18 | .load(url) 19 | .apply(RequestOptions.placeholderOf(holderDrawable)) 20 | .apply(RequestOptions.errorOf(errorDrawable)) 21 | .into(imageView) 22 | } 23 | 24 | @BindingAdapter(value = arrayOf("app:imageUrl", "app:placeHolder", "app:error", "app:radius"), requireAll = false) 25 | @JvmStatic 26 | fun loadImage(imageView: ImageView, url: String, holderDrawable: Drawable, errorDrawable: Drawable, radius: Int) { 27 | if (TextUtils.isEmpty(url)) { 28 | return 29 | } 30 | Glide.with(imageView.context) 31 | .load(url) 32 | .apply(RequestOptions.placeholderOf(holderDrawable)) 33 | .apply(RequestOptions.errorOf(errorDrawable)) 34 | .apply(RequestOptions.bitmapTransform(GlideRoundTransform(imageView.context, radius))) 35 | .into(imageView) 36 | } 37 | 38 | @BindingAdapter(value = arrayOf("app:bubblePercent", "app:showText"), requireAll = false) 39 | @JvmStatic 40 | fun bubblePercent(imageView: BubbleImageView, percent: Int, showText: Boolean) { 41 | imageView.setProgressVisible(showText) 42 | if (showText) { 43 | imageView.setPercent(percent) 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/util/FileUtil.java: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.util; 2 | 3 | import android.content.Context; 4 | import android.os.Environment; 5 | 6 | import java.io.File; 7 | 8 | public class FileUtil { 9 | public static final String ROOT_DIR = "Android/data/"; 10 | 11 | public static String getDir(String name, Context context) { 12 | StringBuilder sb = new StringBuilder(); 13 | if (isSDCardAvailable()) { 14 | sb.append(getExternalStoragePath(context)); 15 | } else { 16 | sb.append(getCachePath(context)); 17 | } 18 | sb.append(name); 19 | sb.append(File.separator); 20 | String path = sb.toString(); 21 | if (createDirs(path)) { 22 | return path; 23 | } else { 24 | return null; 25 | } 26 | } 27 | 28 | public static boolean isSDCardAvailable() { 29 | if (Environment.MEDIA_MOUNTED.equals(Environment 30 | .getExternalStorageState())) { 31 | return true; 32 | } else { 33 | return false; 34 | } 35 | } 36 | 37 | public static boolean createDirs(String dirPath) { 38 | File file = new File(dirPath); 39 | if (!file.exists() || !file.isDirectory()) { 40 | return file.mkdirs(); 41 | } 42 | return true; 43 | } 44 | 45 | public static String getExternalStoragePath(Context context) { 46 | StringBuilder sb = new StringBuilder(); 47 | sb.append(Environment.getExternalStorageDirectory().getAbsolutePath()); 48 | sb.append(File.separator); 49 | sb.append(ROOT_DIR); 50 | sb.append(context.getPackageName()); 51 | sb.append(File.separator); 52 | return sb.toString(); 53 | } 54 | 55 | public static String getCachePath(Context context) { 56 | File f = context.getCacheDir(); 57 | if (null == f) { 58 | return null; 59 | } else { 60 | return f.getAbsolutePath() + "/"; 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/base/BaseActivity.kt: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.base 2 | 3 | import android.app.Activity 4 | import android.content.pm.ActivityInfo 5 | import android.content.res.TypedArray 6 | import android.os.Build 7 | import android.os.Bundle 8 | import android.support.v7.app.AppCompatActivity 9 | import com.simple.wechatsimple.MyApp 10 | 11 | 12 | open class BaseActivity : AppCompatActivity() { 13 | 14 | override fun onCreate(savedInstanceState: Bundle?) { 15 | 16 | if (Build.VERSION.SDK_INT == Build.VERSION_CODES.O && isTranslucentOrFloating()) { 17 | fixOrientation() 18 | } 19 | super.onCreate(savedInstanceState) 20 | MyApp.getInstance().addActivity(this) 21 | } 22 | 23 | override fun onDestroy() { 24 | super.onDestroy() 25 | MyApp.getInstance().removeActivity(this) 26 | } 27 | 28 | private fun isTranslucentOrFloating(): Boolean { 29 | var isTranslucentOrFloating = false 30 | try { 31 | val styleableRes = Class.forName("com.android.internal.R\$styleable").getField("Window").get(null) as IntArray 32 | val ta = obtainStyledAttributes(styleableRes) 33 | val m = ActivityInfo::class.java.getMethod("isTranslucentOrFloating", TypedArray::class.java) 34 | m.isAccessible = true 35 | isTranslucentOrFloating = m.invoke(null, ta) as Boolean 36 | m.isAccessible = false 37 | } catch (e: Exception) { 38 | e.printStackTrace() 39 | } 40 | 41 | return isTranslucentOrFloating 42 | } 43 | 44 | private fun fixOrientation(): Boolean { 45 | try { 46 | val field = Activity::class.java.getDeclaredField("mActivityInfo") 47 | field.isAccessible = true 48 | val o = field.get(this) as ActivityInfo 49 | o.screenOrientation = -1 50 | field.isAccessible = false 51 | return true 52 | } catch (e: Exception) { 53 | e.printStackTrace() 54 | } 55 | 56 | return false 57 | } 58 | 59 | 60 | } -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/base/BaseBindingAdapter.java: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.base; 2 | 3 | import android.content.Context; 4 | import android.databinding.DataBindingUtil; 5 | import android.databinding.ViewDataBinding; 6 | import android.support.annotation.LayoutRes; 7 | import android.support.v7.widget.RecyclerView; 8 | import android.view.LayoutInflater; 9 | import android.view.View; 10 | import android.view.ViewGroup; 11 | 12 | import java.util.ArrayList; 13 | import java.util.List; 14 | 15 | public abstract class BaseBindingAdapter extends RecyclerView.Adapter { 16 | protected Context context; 17 | protected List items; 18 | 19 | public BaseBindingAdapter(Context context) { 20 | this.context = context; 21 | this.items = new ArrayList<>(); 22 | } 23 | 24 | public BaseBindingAdapter(Context context, List items) { 25 | this.context = context; 26 | this.items = items; 27 | } 28 | 29 | @Override 30 | public int getItemCount() { 31 | return this.items.size(); 32 | } 33 | 34 | @Override 35 | public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { 36 | B binding = DataBindingUtil.inflate(LayoutInflater.from(this.context), this.getLayoutResId(viewType), parent, false); 37 | return new BaseBindingViewHolder(binding.getRoot()); 38 | } 39 | 40 | @Override 41 | public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { 42 | B binding = DataBindingUtil.getBinding(holder.itemView); 43 | this.onBindItem(binding, this.items.get(position)); 44 | } 45 | 46 | protected abstract @LayoutRes 47 | int getLayoutResId(int viewType); 48 | 49 | protected abstract void onBindItem(B binding, M item); 50 | 51 | public void setData(List items) { 52 | this.items.clear(); 53 | this.items.addAll(items); 54 | 55 | notifyDataSetChanged(); 56 | } 57 | 58 | class BaseBindingViewHolder extends RecyclerView.ViewHolder { 59 | public BaseBindingViewHolder(View itemView) { 60 | super(itemView); 61 | } 62 | } 63 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ### 🚀 Wechat IM In Android 2 | * * * 3 | ##### 该项目是仿微信7.0实现一个IM APP,APP端基于Kotlin语言以及C++,Server端基于C++,利用Google Databingding Library、Lifecycle、LiveData、RxKotlin、Retrofit、Mars(IM组件)、Muduo(Linux IM组件)、Protobuf 等框架进行开发, 项目包括Android端、Linux服务端。 4 | 5 | [![](https://storage.dreambigcareer.com/simple/mars-v1.2.2-red.svg)](https://www.baidu.com) [![](https://storage.dreambigcareer.com/simple/muduo-v2.0.0-blue.svg)](https://www.baidu.com) [![](https://storage.dreambigcareer.com/simple/mvvm-databinding%20-yellowgreen.svg)](https://www.baidu.com) [![](https://storage.dreambigcareer.com/simple/kotlin-1.3.11-orange.svg)](https://www.baidu.com) [![](https://storage.dreambigcareer.com/simple/wechat-7.0.0-brightgreen.svg)](https://www.baidu.com) 6 | 7 | #### 项目预览 8 | ![23917a9ef79a310b0a564d4dc7484f62.jpeg](https://storage.dreambigcareer.com/simple/2.jpg)![11fe0cce24fee545a443ad10413bc848.jpeg](https://storage.dreambigcareer.com/simple/3%281%29.jpg)![2042a60d77c9e0a300ab4b9d579c62ca.jpeg](https://storage.dreambigcareer.com/simple/1.jpg) 9 | 10 | #### 项目结构 11 | ##### 依赖框架 12 | | 框架名称 |描述 | 13 | | --- | --- | 14 | | Google Databingding Library |基于Mvvm模式开发 | 15 | | Lifecycle | 辅助Mvvm框架 | 16 | | RxKotlin | 优雅的异步处理,以及优化代码逻辑 | 17 | | Retrofit | 处理api | 18 | | LiveData | 处理事件 | 19 | | Mars | 前端通信框架 | 20 | | Muduo | 服务端框架 | 21 | | Protobuf | 超高性能通信协议 | 22 | ##### 项目结构 23 | [WechatBySimple](https://github.com/ftylitak/qzxing):Android端代码 24 | 25 | | Module |描述 | 26 | | --- | --- | 27 | | [app](https://github.com/sps135/wechatbysimple/tree/master/WechatBySimple/app) |UI层 | 28 | | [imlib](https://github.com/sps135/wechatbysimple/tree/master/WechatBySimple/imlib) | IM封装 | 29 | | [uploadservice](https://github.com/sps135/wechatbysimple/tree/master/WechatBySimple/uploadservice) | 为imlib提供ftp服务 | 30 | | [wrapper](https://github.com/sps135/wechatbysimple/tree/master/WechatBySimple/wrapper) | 利用mars为imlib提供TCP链接| 31 | 32 | [IMServer](https://github.com/sps135/wechatbysimple/tree/master/IMServer):IM端代码 33 | 34 | [IMApiServer](https://github.com/sps135/wechatbysimple/tree/master/WechatBySimple):提供基本Api 35 | #### 如何运行部署项目: 36 | ##### 1.编译Android端代码 37 | 环境要求: 38 | Android studio 3.0以上 39 | ##### 2.编译Server IM服务代码 40 | 环境要求: 41 | Linux 42 | ##### 2.编译Server Api服务代码 43 | 环境要求: 44 | Linux 45 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/model/ContactItemModel.java: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.model; 2 | 3 | public class ContactItemModel { 4 | 5 | public static final int ITEM = 0; 6 | public static final int SECTION = 1; 7 | 8 | public ContactItemModel(String text) { 9 | this.type = SECTION; 10 | this.text = text; 11 | this.isTitle = true; 12 | } 13 | 14 | public ContactItemModel() { 15 | this.type = ITEM; 16 | this.isTitle = false; 17 | } 18 | 19 | private int uid; 20 | 21 | private String nickname; 22 | 23 | private String portrait = ""; 24 | 25 | 26 | private int type; 27 | private String text; 28 | private int sectionPosition; 29 | private int listPosition; 30 | private boolean isTitle; 31 | 32 | public int getUid() { 33 | return uid; 34 | } 35 | 36 | public void setUid(int uid) { 37 | this.uid = uid; 38 | } 39 | 40 | public String getNickname() { 41 | return nickname; 42 | } 43 | 44 | public void setNickname(String nickname) { 45 | this.nickname = nickname; 46 | } 47 | 48 | public String getPortrait() { 49 | return portrait; 50 | } 51 | 52 | public void setPortrait(String portrait) { 53 | this.portrait = portrait; 54 | } 55 | 56 | public int getType() { 57 | return type; 58 | } 59 | 60 | public void setType(int type) { 61 | this.type = type; 62 | } 63 | 64 | public int getSectionPosition() { 65 | return sectionPosition; 66 | } 67 | 68 | public void setSectionPosition(int sectionPosition) { 69 | this.sectionPosition = sectionPosition; 70 | } 71 | 72 | public int getListPosition() { 73 | return listPosition; 74 | } 75 | 76 | public void setListPosition(int listPosition) { 77 | this.listPosition = listPosition; 78 | } 79 | 80 | public String getText() { 81 | return text; 82 | } 83 | 84 | public void setText(String text) { 85 | this.text = text; 86 | } 87 | 88 | public boolean isTitle() { 89 | return isTitle; 90 | } 91 | 92 | public void setTitle(boolean title) { 93 | isTitle = title; 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/contacts/ContactAdapter.kt: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.contacts 2 | 3 | import android.databinding.DataBindingUtil 4 | import android.view.LayoutInflater 5 | import android.view.View 6 | import android.view.ViewGroup 7 | import android.widget.BaseAdapter 8 | import com.simple.wechatsimple.databinding.ItemContactBinding 9 | import com.simple.wechatsimple.model.ContactItemModel 10 | import de.halfbit.pinnedsection.PinnedSectionListView 11 | 12 | open class ContactAdapter(val viewModel: ContactsViewModel) : BaseAdapter(), PinnedSectionListView.PinnedSectionListAdapter { 13 | 14 | private var datas: MutableList 15 | 16 | init { 17 | datas = mutableListOf() 18 | } 19 | 20 | override fun getView(position: Int, convertView: View?, parent: ViewGroup?): View { 21 | val binding: ItemContactBinding 22 | 23 | if (convertView == null) { 24 | val inflater = LayoutInflater.from(parent!!.context) 25 | 26 | binding = ItemContactBinding.inflate(inflater, parent, false) 27 | } else { 28 | binding = DataBindingUtil.getBinding(convertView)!! 29 | } 30 | 31 | val itemListener = object : OnItemClickListener { 32 | override fun onItemClick() { 33 | viewModel.onItemEvent.value = datas[position] 34 | } 35 | } 36 | 37 | with(binding) { 38 | contact = datas[position] 39 | listener = itemListener 40 | executePendingBindings() 41 | } 42 | 43 | return binding.root 44 | } 45 | 46 | override fun getItem(position: Int) = datas[position] 47 | 48 | override fun getItemId(position: Int) = position.toLong() 49 | 50 | override fun getCount() = datas.size 51 | 52 | override fun getViewTypeCount() = 2 53 | 54 | override fun getItemViewType(position: Int) = datas[position].type 55 | 56 | override fun isItemViewTypePinned(viewType: Int) = viewType == ContactItemModel.SECTION 57 | 58 | fun setData(dataMap: List) { 59 | datas.clear() 60 | datas.addAll(dataMap) 61 | 62 | notifyDataSetChanged() 63 | } 64 | 65 | interface OnItemClickListener { 66 | fun onItemClick() 67 | } 68 | 69 | } -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/util/ViewModelFactory.kt: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.util 2 | 3 | import android.app.Application 4 | import android.arch.lifecycle.ViewModel 5 | import android.arch.lifecycle.ViewModelProvider 6 | import com.simple.wechatsimple.contacts.ContactsViewModel 7 | import com.simple.wechatsimple.data.source.DataSourceRepository 8 | import com.simple.wechatsimple.data.source.inject.Injection 9 | import com.simple.wechatsimple.login.LoginViewModel 10 | import com.simple.wechatsimple.recent.RecentViewModel 11 | import com.simple.wechatsimple.session.SessionViewModel 12 | 13 | class ViewModelFactory private constructor( 14 | private val application: Application, 15 | private val dataSourceRepository: DataSourceRepository) : ViewModelProvider.NewInstanceFactory() { 16 | 17 | override fun create(modelClass: Class) = 18 | with(modelClass) { 19 | when { 20 | isAssignableFrom(LoginViewModel::class.java) -> 21 | LoginViewModel(application, dataSourceRepository) 22 | isAssignableFrom(ContactsViewModel::class.java) -> 23 | ContactsViewModel(application, dataSourceRepository) 24 | isAssignableFrom(SessionViewModel::class.java) -> 25 | SessionViewModel(application, dataSourceRepository) 26 | isAssignableFrom(RecentViewModel::class.java) -> 27 | RecentViewModel(application, dataSourceRepository) 28 | else -> 29 | throw IllegalArgumentException("Unknown ViewModel class: ${modelClass.name}") 30 | } as T 31 | } 32 | 33 | companion object { 34 | @Volatile 35 | private var INSTANCE: ViewModelFactory? = null 36 | 37 | fun getInstance(application: Application) = INSTANCE 38 | ?: synchronized(ViewModelFactory::class.java) { 39 | INSTANCE 40 | ?: ViewModelFactory(application, 41 | Injection.provideDataRepository()) 42 | .also { 43 | INSTANCE = it 44 | } 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /WechatBySimple/uploadservice/src/main/java/com/simple/upload/UploadTaskParameters.java: -------------------------------------------------------------------------------- 1 | package com.simple.upload; 2 | 3 | import android.os.Parcel; 4 | import android.os.Parcelable; 5 | 6 | import java.util.ArrayList; 7 | 8 | /** 9 | */ 10 | public final class UploadTaskParameters implements Parcelable { 11 | 12 | public String id; 13 | public String serverUrl; 14 | private int maxRetries = 0; 15 | public boolean autoDeleteSuccessfullyUploadedFiles = false; 16 | public ArrayList files = new ArrayList<>(); 17 | 18 | public UploadTaskParameters() { 19 | 20 | } 21 | 22 | // This is used to regenerate the object. 23 | // All Parcelables must have a CREATOR that implements these two methods 24 | public static final Creator CREATOR = 25 | new Creator() { 26 | @Override 27 | public UploadTaskParameters createFromParcel(final Parcel in) { 28 | return new UploadTaskParameters(in); 29 | } 30 | 31 | @Override 32 | public UploadTaskParameters[] newArray(final int size) { 33 | return new UploadTaskParameters[size]; 34 | } 35 | }; 36 | 37 | @Override 38 | public void writeToParcel(Parcel parcel, int arg1) { 39 | parcel.writeString(id); 40 | parcel.writeString(serverUrl); 41 | parcel.writeInt(maxRetries); 42 | parcel.writeByte((byte) (autoDeleteSuccessfullyUploadedFiles ? 1 : 0)); 43 | parcel.writeList(files); 44 | } 45 | 46 | private UploadTaskParameters(Parcel in) { 47 | id = in.readString(); 48 | serverUrl = in.readString(); 49 | maxRetries = in.readInt(); 50 | autoDeleteSuccessfullyUploadedFiles = in.readByte() == 1; 51 | in.readList(files, UploadFile.class.getClassLoader()); 52 | } 53 | 54 | @Override 55 | public int describeContents() { 56 | return 0; 57 | } 58 | 59 | public int getMaxRetries() { 60 | return maxRetries; 61 | } 62 | 63 | public UploadTaskParameters setMaxRetries(int maxRetries) { 64 | if (maxRetries < 0) 65 | this.maxRetries = 0; 66 | else 67 | this.maxRetries = maxRetries; 68 | 69 | return this; 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /WechatBySimple/app/src/main/java/com/simple/wechatsimple/data/source/remote/network/Network.kt: -------------------------------------------------------------------------------- 1 | package com.simple.wechatsimple.data.source.remote.network 2 | 3 | import okhttp3.OkHttpClient 4 | import okhttp3.logging.HttpLoggingInterceptor 5 | import retrofit2.Retrofit 6 | import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory 7 | import retrofit2.converter.gson.GsonConverterFactory 8 | import java.util.concurrent.TimeUnit 9 | 10 | const val URL = "http://XXX.XXX.XXX.XXX:XXXX" 11 | 12 | class Network { 13 | 14 | companion object { 15 | private var networkApi: NetworkApi? = null 16 | 17 | @JvmStatic 18 | fun getNetworkApi(): NetworkApi { 19 | synchronized(Network::class.java) { 20 | if (networkApi == null) { 21 | val logInterceptor = HttpLoggingInterceptor() 22 | logInterceptor.level = HttpLoggingInterceptor.Level.BODY 23 | val okHttpClient = OkHttpClient() 24 | .newBuilder() 25 | .retryOnConnectionFailure(true) 26 | .connectTimeout(30, TimeUnit.SECONDS) 27 | .readTimeout(30, TimeUnit.SECONDS) 28 | .writeTimeout(30, TimeUnit.SECONDS) 29 | .addInterceptor { 30 | val request = it 31 | .request() 32 | .newBuilder() 33 | .addHeader("Connection", "close") 34 | .build() 35 | it.proceed(request) 36 | } 37 | .addInterceptor(logInterceptor) 38 | .build() 39 | val retrofit = Retrofit 40 | .Builder() 41 | .client(okHttpClient) 42 | .baseUrl(URL) 43 | .addConverterFactory(GsonConverterFactory.create()) 44 | .addCallAdapterFactory(RxJava2CallAdapterFactory.create()) 45 | .build() 46 | networkApi = retrofit.create(NetworkApi::class.java) 47 | } 48 | } 49 | return networkApi!! 50 | } 51 | } 52 | } --------------------------------------------------------------------------------