├── .gitignore ├── .idea ├── codeStyles │ ├── Project.xml │ └── codeStyleConfig.xml ├── gradle.xml ├── misc.xml └── runConfigurations.xml ├── README.md ├── app ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── zzw │ │ └── imtest │ │ └── ExampleInstrumentedTest.kt │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── zzw │ │ │ └── imtest │ │ │ ├── App.java │ │ │ ├── adapter │ │ │ ├── ChatAdapter.java │ │ │ ├── ChatDetailAdapter.java │ │ │ ├── ChatOptionAdapter.java │ │ │ ├── ConversationAdapter.java │ │ │ ├── FriendAdapter.java │ │ │ ├── GroupAdapter.java │ │ │ ├── NewFriendAdapter.java │ │ │ └── NewGroupChatAdapter.java │ │ │ ├── base │ │ │ ├── BaseActivity.java │ │ │ └── BaseFragment.java │ │ │ ├── bean │ │ │ ├── ChatBean.java │ │ │ ├── ChatOptionBean.java │ │ │ └── NewGroupBean.java │ │ │ ├── constant │ │ │ └── VariableName.java │ │ │ ├── service │ │ │ └── IMService.java │ │ │ ├── ui │ │ │ ├── MainActivity.kt │ │ │ ├── chat │ │ │ │ ├── AddFriendActivity.kt │ │ │ │ ├── ChatActivity.kt │ │ │ │ ├── ChatDetailActivity.kt │ │ │ │ ├── ChatFragment.kt │ │ │ │ ├── ChatOptionFragment.kt │ │ │ │ ├── NewGroupChatActivity.kt │ │ │ │ ├── PreviewImageActivity.kt │ │ │ │ ├── UserDetailActivity.kt │ │ │ │ ├── VideoPhoneActivity.kt │ │ │ │ └── VideoPlayerDetailedActivity.java │ │ │ ├── login │ │ │ │ ├── LoginActivity.kt │ │ │ │ └── RegisterActivity.kt │ │ │ ├── maillist │ │ │ │ ├── GroupActivity.kt │ │ │ │ ├── MailListFragment.kt │ │ │ │ └── NewFriendActivity.kt │ │ │ └── my │ │ │ │ ├── CodeActivity.kt │ │ │ │ ├── MyFragment.kt │ │ │ │ ├── PersonInformActivity.kt │ │ │ │ └── ScannerActivity.kt │ │ │ ├── util │ │ │ ├── FileHelper.java │ │ │ ├── InfoLayout.java │ │ │ ├── L.java │ │ │ ├── NotificationClickEventReceiver.kt │ │ │ ├── PlayVoiceUtil.java │ │ │ ├── SaveBitmapToPhoto.java │ │ │ ├── SharedPreferencesHelper.java │ │ │ ├── SoftKeyBoardListener.java │ │ │ ├── TimeFormat.java │ │ │ └── ViewUtil.java │ │ │ └── view │ │ │ ├── AddPop.java │ │ │ ├── CircleImageView.java │ │ │ ├── SearchLayout.java │ │ │ ├── SelectLayout.java │ │ │ ├── SoundTextView.java │ │ │ └── TitleLayout.java │ └── res │ │ ├── drawable-v24 │ │ └── ic_launcher_foreground.xml │ │ ├── drawable-xhdpi │ │ ├── jmui_receive_3.png │ │ ├── receive_1.png │ │ ├── receive_2.png │ │ ├── send_1.png │ │ ├── send_2.png │ │ └── send_3.png │ │ ├── drawable-xxxhdpi │ │ ├── default_project_img.jpg │ │ ├── ic_account.png │ │ ├── ic_add.png │ │ ├── ic_back.png │ │ ├── ic_clear.png │ │ ├── ic_close.png │ │ ├── ic_collect.png │ │ ├── ic_collected.png │ │ ├── ic_delete.png │ │ ├── ic_done.png │ │ ├── ic_favorite.png │ │ ├── ic_history.png │ │ ├── ic_more.png │ │ ├── ic_password_see.png │ │ ├── ic_password_see_on.png │ │ ├── ic_right.png │ │ ├── ic_search.png │ │ ├── ic_tag.png │ │ ├── ic_wandroid.png │ │ ├── ic_yiguoqi.png │ │ ├── load_empty.png │ │ ├── load_error.png │ │ ├── menu_main.png │ │ ├── menu_me.png │ │ ├── menu_project.png │ │ ├── menu_public.png │ │ ├── menu_tree.png │ │ ├── scanner_flashlight_normal.png │ │ ├── scanner_flashlight_pressed.png │ │ └── wx_scan_line.png │ │ ├── drawable │ │ ├── address_bg.xml │ │ ├── button_shap.xml │ │ ├── buy_btn_bg.xml │ │ ├── chat_detail_add.xml │ │ ├── chat_item_receive.xml │ │ ├── chat_item_send.xml │ │ ├── chat_receive_bg.xml │ │ ├── chat_send_bg.xml │ │ ├── confirm_turn_out.xml │ │ ├── edit_shap.xml │ │ ├── et_bg.xml │ │ ├── et_cursor.xml │ │ ├── flow_selector.xml │ │ ├── forground_shap.xml │ │ ├── header_bg.xml │ │ ├── ic_launcher_background.xml │ │ ├── item_imgselector.xml │ │ ├── item_selector.xml │ │ ├── keyvisibily_selector.xml │ │ ├── main_dialog_top.xml │ │ ├── notice_spot.xml │ │ ├── recharge_code_bg.xml │ │ ├── redp_bg.xml │ │ ├── redp_v_bg.xml │ │ ├── round_background.xml │ │ ├── scanner_flashlight.xml │ │ ├── search_bg.xml │ │ ├── switch_in_bg.xml │ │ ├── title_lable_shap.xml │ │ ├── title_lable_shap1.xml │ │ ├── user_detail_top.xml │ │ ├── voice_receive_play.xml │ │ └── voice_send_play.xml │ │ ├── layout │ │ ├── activity_add_friend.xml │ │ ├── activity_chat.xml │ │ ├── activity_chat_detail.xml │ │ ├── activity_code.xml │ │ ├── activity_group.xml │ │ ├── activity_login.xml │ │ ├── activity_main.xml │ │ ├── activity_new_friend.xml │ │ ├── activity_new_group_chat.xml │ │ ├── activity_person_inform.xml │ │ ├── activity_preview.xml │ │ ├── activity_register.xml │ │ ├── activity_scanner.xml │ │ ├── activity_user_detail.xml │ │ ├── activity_video_phone.xml │ │ ├── fragment_chat.xml │ │ ├── fragment_chat_option.xml │ │ ├── fragment_mail_list.xml │ │ ├── fragment_my.xml │ │ ├── include_toolbar.xml │ │ ├── item_chat_address_receive.xml │ │ ├── item_chat_address_send.xml │ │ ├── item_chat_card_receive.xml │ │ ├── item_chat_card_send.xml │ │ ├── item_chat_detail.xml │ │ ├── item_chat_file_receive.xml │ │ ├── item_chat_file_send.xml │ │ ├── item_chat_img_receive.xml │ │ ├── item_chat_img_send.xml │ │ ├── item_chat_option.xml │ │ ├── item_chat_redp_receive.xml │ │ ├── item_chat_redp_send.xml │ │ ├── item_chat_retract.xml │ │ ├── item_chat_text_receive.xml │ │ ├── item_chat_text_send.xml │ │ ├── item_chat_voice_receive.xml │ │ ├── item_chat_voice_send.xml │ │ ├── item_group.xml │ │ ├── item_mail_list_content.xml │ │ ├── item_main_dialog.xml │ │ ├── item_new_friend.xml │ │ ├── item_new_group_content.xml │ │ ├── jmui_dialog_record_voice.xml │ │ ├── layout_info.xml │ │ ├── layout_pop_dialog_add.xml │ │ ├── layout_search.xml │ │ ├── layout_select.xml │ │ ├── layout_title.xml │ │ └── video_layout.xml │ │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── add.png │ │ ├── add_blue.png │ │ ├── add_dialog.png │ │ ├── add_friend.png │ │ ├── add_friend_white.png │ │ ├── add_group_chat.png │ │ ├── address_map_bg.webp │ │ ├── back.png │ │ ├── back_icon.png │ │ ├── chat_option_address.png │ │ ├── chat_option_file.png │ │ ├── chat_option_person.png │ │ ├── chat_option_photo.png │ │ ├── chat_option_redpacket.png │ │ ├── code.png │ │ ├── dialog_select.png │ │ ├── dialog_unselect.png │ │ ├── handfs_free.png │ │ ├── head_default.png │ │ ├── ic_launcher.png │ │ ├── ic_launcher_round.png │ │ ├── icon_softkeyboard.png │ │ ├── jmui_document.png │ │ ├── jmui_mic.png │ │ ├── mail_list_select.png │ │ ├── mail_list_unselect.png │ │ ├── message.png │ │ ├── mian_dialog_add.png │ │ ├── my_collection.png │ │ ├── my_scanner.png │ │ ├── my_select.png │ │ ├── my_setting.png │ │ ├── my_unselect.png │ │ ├── my_wallet.png │ │ ├── phone.png │ │ ├── pop_group_chat.png │ │ ├── redp.png │ │ ├── scanner_icon.png │ │ ├── scanner_white.png │ │ ├── search.png │ │ ├── select.png │ │ ├── smile_face.png │ │ ├── sound_record.png │ │ ├── stop_handfs_free.png │ │ ├── unselect.png │ │ ├── video_phone.png │ │ └── video_phone_receive.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ └── values │ │ ├── attrs.xml │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── zzw │ └── imtest │ └── ExampleUnitTest.kt ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── img ├── 微信图片_20190917100534.jpg ├── 微信图片_20190917100553.jpg ├── 微信图片_20190917100557.jpg ├── 微信图片_20190917100601.jpg ├── 微信图片_20190917100605.jpg ├── 微信图片_20190917100611.jpg ├── 微信图片_20190917100615.jpg ├── 微信图片_20190917100618.jpg ├── 微信图片_20190917100625.jpg └── 微信图片_20190917100628.jpg └── settings.gradle /.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 | .cxx 15 | -------------------------------------------------------------------------------- /.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 19 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2020.12.15 2 | 修改了appkey,现在可以正常使用了 3 | 4 | # WanIm 5 | app预览 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 实现功能 15 | 16 | 1.用户的登录注册 17 | 18 | 2.单聊,能清空聊天记录,且对于单人可以进行.语音通话,(这个部分我做的比官方demo要好得多,可以全局监听,但是没做群聊语音通话和视频通话) 19 | 20 | 3.群聊,能清空聊天记录、修改群名和修改群头像(只有群主才可以做) 21 | 22 | 4.消息类型:文字(包含系统表情)、语音、图片、视频、文件、语音通话记录(自定义消息)。 23 | 24 | 5.扫码或输入用户名搜索添加好友。 25 | 26 | 6.修改自身用户的头像和昵称、性别 27 | 28 |   29 | 30 | 比官方demo强的地方 31 | 32 | 1.有语音通话的实现 33 | 34 | 2.支持AndroidX 35 | 36 |   37 | 38 | SDK暗坑 39 | 40 | 关于添加好友,如果你申请添加一个好友,他会到接受一个消息通知,对于好友申请不会保存在网络,需要自己缓存。 41 | 42 | 这里有安装包 43 | 44 | https://github.com/979451341/WanIm/releases/tag/1.0 45 | 46 |   47 | 48 | 49 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | apply plugin: 'kotlin-android' 4 | 5 | apply plugin: 'kotlin-android-extensions' 6 | 7 | android { 8 | compileSdkVersion 29 9 | buildToolsVersion "29.0.0" 10 | defaultConfig { 11 | applicationId "zzw.imtest" 12 | minSdkVersion 21 13 | targetSdkVersion 29 14 | versionCode 1 15 | versionName "1.0" 16 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 17 | 18 | ndk { 19 | //选择要添加的对应cpu类型的.so库。 20 | abiFilters 'armeabi', 'armeabi-v7a', 'armeabi-v8a' 21 | // 还可以添加 'x86', 'x86_64', 'mips', 'mips64' 22 | } 23 | manifestPlaceholders = [ 24 | JPUSH_PKGNAME: applicationId, 25 | JPUSH_APPKEY : "1d695fabfbb3660ef6d4b267", //JPush上注册的包名对应的appkey. 26 | JPUSH_CHANNEL: "developer-default", //暂时填写默认值即可. 27 | ] 28 | 29 | } 30 | buildTypes { 31 | release { 32 | minifyEnabled false 33 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 34 | } 35 | } 36 | } 37 | 38 | dependencies { 39 | implementation fileTree(dir: 'libs', include: ['*.jar']) 40 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 41 | implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.0" 42 | 43 | 44 | //androidX基础 45 | implementation 'androidx.core:core-ktx:1.0.2' 46 | 47 | implementation "androidx.appcompat:appcompat:1.1.0-rc01" 48 | implementation 'com.google.android.material:material:1.1.0-alpha09' 49 | implementation "androidx.constraintlayout:constraintlayout:1.1.3" 50 | implementation "androidx.preference:preference:1.1.0-rc01" 51 | implementation "androidx.cardview:cardview:1.0.0" 52 | 53 | testImplementation 'junit:junit:4.12' 54 | androidTestImplementation 'androidx.test:runner:1.2.0' 55 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' 56 | 57 | 58 | implementation 'cn.jiguang.sdk:jmessage:2.9.0' // 此处以JMessage 2.9.0 版本为例。 59 | implementation 'cn.jiguang.sdk:jcore:2.0.0' // 此处以JCore 2.0.0 版本为例。 60 | api 'cn.jiguang.sdk:jmrtc:1.0.2' // 此处以jmrtc 1.0.2 版本为例 61 | 62 | //recyc适配器 63 | api 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.46' 64 | 65 | //屏幕适配 66 | api 'me.jessyan:autosize:0.9.1' 67 | 68 | //对话框框架 69 | api 'com.mylhyl:circleDialog:4.0.0' 70 | 71 | //表情包 72 | api 'io.github.rockerhieu:emojicon:1.4.2' 73 | 74 | //权限框架 75 | api 'com.yanzhenjie:permission:1.1.2' 76 | 77 | //多图片选择 78 | // api 'com.github.LuckSiege.PictureSelector:picture_library:v2.2.4' 79 | implementation 'com.github.labmem005.PictureSelector:picture_library:v2.3.1' 80 | 81 | //二维码生成和扫描 82 | api 'com.mylhyl:zxingscanner:2.1.4' 83 | api 'com.google.zxing:core:3.3.0' 84 | 85 | api 'io.reactivex.rxjava2:rxjava:2.1.3' 86 | api 'io.reactivex.rxjava2:rxandroid:2.0.1' 87 | 88 | //加載框 89 | api 'com.github.limxing:Android-PromptDialog:1.1.3' 90 | //播放视频 91 | implementation 'com.ycjiang:VideoPlayModule-Lite:2.1.80' 92 | //文件选择 93 | api 'com.leon:lfilepickerlibrary:1.8.0' 94 | 95 | api 'com.tencent.bugly:crashreport:latest.release' //其中latest.release指代最新Bugly SDK版本号,也可以指定明确的版本号,例如2.1.9 96 | api 'com.tencent.bugly:nativecrashreport:latest.release' //其中latest.release指代最新Bugly NDK版本号,也可以指定明确的版本号,例如3.0 97 | 98 | 99 | 100 | implementation 'com.github.bumptech.glide:glide:4.9.0' 101 | annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0' 102 | 103 | } 104 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /app/src/androidTest/java/zzw/imtest/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package zzw.imtest 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.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.getInstrumentation().targetContext 22 | assertEquals("zzw.imtest", appContext.packageName) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/src/main/java/zzw/imtest/adapter/ChatDetailAdapter.java: -------------------------------------------------------------------------------- 1 | package zzw.imtest.adapter; 2 | 3 | import android.graphics.Bitmap; 4 | import android.text.TextUtils; 5 | import android.view.View; 6 | import android.widget.ImageView; 7 | 8 | import androidx.annotation.Nullable; 9 | 10 | import com.chad.library.adapter.base.BaseQuickAdapter; 11 | import com.chad.library.adapter.base.BaseViewHolder; 12 | 13 | 14 | import java.util.List; 15 | 16 | import cn.jpush.im.android.api.callback.GetAvatarBitmapCallback; 17 | import cn.jpush.im.android.api.model.UserInfo; 18 | import zzw.imtest.R; 19 | import zzw.imtest.bean.NewGroupBean; 20 | import zzw.imtest.util.L; 21 | 22 | public class ChatDetailAdapter extends BaseQuickAdapter { 23 | 24 | public ChatDetailAdapter(int layoutResId, @Nullable List data) { 25 | super(layoutResId, data); 26 | } 27 | 28 | @Override 29 | protected void convert(final BaseViewHolder helper, NewGroupBean item) { 30 | 31 | 32 | if(item.userInfo == null){ 33 | return; 34 | } 35 | 36 | helper.getView(R.id.iv).setVisibility(View.VISIBLE); 37 | helper.getView(R.id.tv).setVisibility(View.VISIBLE); 38 | 39 | item.userInfo.getAvatarBitmap(new GetAvatarBitmapCallback() { 40 | @Override 41 | public void gotResult(int i, String s, Bitmap bitmap) { 42 | if(i==0){ 43 | ((ImageView)helper.getView(R.id.iv)).setImageBitmap(bitmap); 44 | } 45 | } 46 | }); 47 | 48 | helper.setText(R.id.tv, L.getName(item.userInfo)); 49 | 50 | 51 | 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /app/src/main/java/zzw/imtest/adapter/ChatOptionAdapter.java: -------------------------------------------------------------------------------- 1 | package zzw.imtest.adapter; 2 | 3 | 4 | import androidx.annotation.Nullable; 5 | 6 | import com.chad.library.adapter.base.BaseQuickAdapter; 7 | import com.chad.library.adapter.base.BaseViewHolder; 8 | 9 | import java.util.List; 10 | 11 | import zzw.imtest.R; 12 | import zzw.imtest.bean.ChatOptionBean; 13 | 14 | public class ChatOptionAdapter extends BaseQuickAdapter { 15 | 16 | public ChatOptionAdapter(int layoutResId, @Nullable List data) { 17 | super(layoutResId, data); 18 | } 19 | 20 | @Override 21 | protected void convert(BaseViewHolder helper, ChatOptionBean item) { 22 | 23 | 24 | helper.setImageResource(R.id.iv,item.img); 25 | 26 | 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/java/zzw/imtest/adapter/FriendAdapter.java: -------------------------------------------------------------------------------- 1 | package zzw.imtest.adapter; 2 | 3 | import android.graphics.Bitmap; 4 | import android.text.TextUtils; 5 | import android.widget.ImageView; 6 | 7 | import androidx.annotation.Nullable; 8 | 9 | import com.chad.library.adapter.base.BaseQuickAdapter; 10 | import com.chad.library.adapter.base.BaseViewHolder; 11 | 12 | 13 | import java.util.List; 14 | 15 | import cn.jpush.im.android.api.callback.GetAvatarBitmapCallback; 16 | import cn.jpush.im.android.api.model.Conversation; 17 | import cn.jpush.im.android.api.model.UserInfo; 18 | import zzw.imtest.R; 19 | 20 | 21 | public class FriendAdapter extends BaseQuickAdapter { 22 | 23 | public FriendAdapter(int layoutResId, @Nullable List data) { 24 | super(layoutResId, data); 25 | } 26 | 27 | @Override 28 | protected void convert(final BaseViewHolder helper, UserInfo item) { 29 | 30 | 31 | item.getAvatarBitmap(new GetAvatarBitmapCallback() { 32 | @Override 33 | public void gotResult(int i, String s, Bitmap bitmap) { 34 | if(i == 0){ 35 | ((ImageView)helper.getView(R.id.iv)).setImageBitmap(bitmap); 36 | } 37 | } 38 | }); 39 | 40 | if(TextUtils.isEmpty(item.getNickname())){ 41 | helper.setText(R.id.tv,item.getUserName()); 42 | }else{ 43 | helper.setText(R.id.tv,item.getNickname()); 44 | } 45 | 46 | 47 | } 48 | } -------------------------------------------------------------------------------- /app/src/main/java/zzw/imtest/adapter/GroupAdapter.java: -------------------------------------------------------------------------------- 1 | package zzw.imtest.adapter; 2 | 3 | import android.graphics.Bitmap; 4 | import android.text.TextUtils; 5 | import android.widget.ImageView; 6 | 7 | import androidx.annotation.Nullable; 8 | 9 | import com.bumptech.glide.Glide; 10 | import com.bumptech.glide.load.DataSource; 11 | import com.bumptech.glide.load.engine.GlideException; 12 | import com.bumptech.glide.request.RequestListener; 13 | import com.bumptech.glide.request.target.Target; 14 | import com.chad.library.adapter.base.BaseQuickAdapter; 15 | import com.chad.library.adapter.base.BaseViewHolder; 16 | 17 | 18 | import java.util.List; 19 | 20 | import cn.jpush.im.android.api.JMessageClient; 21 | import cn.jpush.im.android.api.callback.GetAvatarBitmapCallback; 22 | import cn.jpush.im.android.api.model.Conversation; 23 | import cn.jpush.im.android.api.model.GroupInfo; 24 | import zzw.imtest.R; 25 | 26 | public class GroupAdapter extends BaseQuickAdapter { 27 | 28 | public GroupAdapter(int layoutResId, @Nullable List data) { 29 | super(layoutResId, data); 30 | } 31 | 32 | @Override 33 | protected void convert(final BaseViewHolder helper, Long item) { 34 | 35 | 36 | 37 | 38 | 39 | 40 | Conversation conversation= JMessageClient.getGroupConversation(item); 41 | if(conversation==null){ 42 | conversation= Conversation.createGroupConversation(item); 43 | } 44 | GroupInfo groupInfo = (GroupInfo)conversation.getTargetInfo() ; 45 | 46 | helper.setText(R.id.tv,groupInfo.getGroupName()); 47 | groupInfo.getAvatarBitmap(new GetAvatarBitmapCallback(){ 48 | 49 | @Override 50 | public void gotResult(int i, String s, Bitmap bitmap) { 51 | if(i==0){ 52 | ((ImageView)helper.getView(R.id.iv)).setImageBitmap(bitmap); 53 | }else{ 54 | 55 | 56 | } 57 | } 58 | }); 59 | 60 | 61 | 62 | 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /app/src/main/java/zzw/imtest/adapter/NewFriendAdapter.java: -------------------------------------------------------------------------------- 1 | package zzw.imtest.adapter; 2 | 3 | import android.graphics.Bitmap; 4 | import android.text.TextUtils; 5 | import android.widget.ImageView; 6 | 7 | import androidx.annotation.Nullable; 8 | 9 | import com.chad.library.adapter.base.BaseQuickAdapter; 10 | import com.chad.library.adapter.base.BaseViewHolder; 11 | 12 | 13 | import java.util.List; 14 | 15 | import cn.jpush.im.android.api.JMessageClient; 16 | import cn.jpush.im.android.api.callback.GetAvatarBitmapCallback; 17 | import cn.jpush.im.android.api.callback.GetUserInfoCallback; 18 | import cn.jpush.im.android.api.event.ContactNotifyEvent; 19 | import cn.jpush.im.android.api.model.Conversation; 20 | import cn.jpush.im.android.api.model.UserInfo; 21 | import zzw.imtest.R; 22 | 23 | 24 | public class NewFriendAdapter extends BaseQuickAdapter { 25 | 26 | public NewFriendAdapter(int layoutResId, @Nullable List data) { 27 | super(layoutResId, data); 28 | } 29 | 30 | @Override 31 | protected void convert(final BaseViewHolder helper, ContactNotifyEvent item) { 32 | 33 | 34 | JMessageClient.getUserInfo(item.getFromUsername(), new GetUserInfoCallback() { 35 | @Override 36 | public void gotResult(int i, String s, UserInfo userInfo) { 37 | if(i==0){ 38 | userInfo.getAvatarBitmap(new GetAvatarBitmapCallback() { 39 | @Override 40 | public void gotResult(int i, String s, Bitmap bitmap) { 41 | if(i==0){ 42 | ((ImageView)helper.getView(R.id.iv)).setImageBitmap(bitmap); 43 | } 44 | } 45 | }); 46 | 47 | if(TextUtils.isEmpty(userInfo.getNickname())){ 48 | helper.setText(R.id.tv,userInfo.getUserName()); 49 | }else{ 50 | helper.setText(R.id.tv,userInfo.getNickname()); 51 | } 52 | } 53 | } 54 | }); 55 | // helper.setText(R.id.tv_name,item.getFromUsername()); 56 | 57 | 58 | helper.setText(R.id.tv_comment,item.getReason()); 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | } 77 | } -------------------------------------------------------------------------------- /app/src/main/java/zzw/imtest/adapter/NewGroupChatAdapter.java: -------------------------------------------------------------------------------- 1 | package zzw.imtest.adapter; 2 | 3 | import android.graphics.Bitmap; 4 | import android.text.TextUtils; 5 | import android.widget.ImageView; 6 | 7 | import androidx.annotation.Nullable; 8 | 9 | import com.bumptech.glide.Glide; 10 | import com.chad.library.adapter.base.BaseQuickAdapter; 11 | import com.chad.library.adapter.base.BaseViewHolder; 12 | 13 | 14 | import java.util.List; 15 | 16 | import cn.jpush.im.android.api.JMessageClient; 17 | import cn.jpush.im.android.api.callback.GetAvatarBitmapCallback; 18 | import cn.jpush.im.android.api.callback.GetUserInfoCallback; 19 | import cn.jpush.im.android.api.event.ContactNotifyEvent; 20 | import cn.jpush.im.android.api.model.Conversation; 21 | import cn.jpush.im.android.api.model.UserInfo; 22 | import zzw.imtest.R; 23 | import zzw.imtest.bean.NewGroupBean; 24 | import zzw.imtest.util.L; 25 | 26 | 27 | public class NewGroupChatAdapter extends BaseQuickAdapter { 28 | 29 | public NewGroupChatAdapter(int layoutResId, @Nullable List data) { 30 | super(layoutResId, data); 31 | } 32 | 33 | @Override 34 | protected void convert(final BaseViewHolder helper, NewGroupBean item) { 35 | 36 | 37 | item.userInfo.getAvatarBitmap(new GetAvatarBitmapCallback() { 38 | @Override 39 | public void gotResult(int i, String s, Bitmap bitmap) { 40 | if(i==0){ 41 | ((ImageView)helper.getView(R.id.iv)).setImageBitmap(bitmap); 42 | } 43 | } 44 | }); 45 | 46 | helper.setText(R.id.tv, L.getName(item.userInfo)); 47 | 48 | if(item.select){ 49 | helper.setImageResource(R.id.iv_select,R.mipmap.select); 50 | }else{ 51 | helper.setImageResource(R.id.iv_select,R.mipmap.unselect); 52 | } 53 | 54 | 55 | 56 | 57 | } 58 | } -------------------------------------------------------------------------------- /app/src/main/java/zzw/imtest/base/BaseActivity.java: -------------------------------------------------------------------------------- 1 | package zzw.imtest.base; 2 | 3 | import android.content.pm.ActivityInfo; 4 | import android.os.Bundle; 5 | 6 | import androidx.annotation.Nullable; 7 | import androidx.appcompat.app.AppCompatActivity; 8 | 9 | import java.util.ArrayList; 10 | import java.util.List; 11 | 12 | import cn.jpush.im.android.api.JMessageClient; 13 | import cn.jpush.im.android.api.event.ContactNotifyEvent; 14 | import cn.jpush.im.android.api.event.LoginStateChangeEvent; 15 | import zzw.imtest.util.L; 16 | 17 | public abstract class BaseActivity extends AppCompatActivity { 18 | 19 | 20 | 21 | public abstract int getLayoutId(); 22 | 23 | 24 | 25 | @Override 26 | protected void onCreate(@Nullable Bundle savedInstanceState) { 27 | super.onCreate(savedInstanceState); 28 | setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);//竖屏 29 | setContentView(getLayoutId()); 30 | 31 | 32 | 33 | //订阅接收消息,子类只要重写onEvent就能收到消息 34 | JMessageClient.registerEventReceiver(this); 35 | 36 | 37 | 38 | 39 | initData(); 40 | initView(); 41 | 42 | 43 | 44 | 45 | } 46 | 47 | 48 | 49 | 50 | 51 | 52 | protected abstract void initView(); 53 | 54 | protected abstract void initData(); 55 | 56 | 57 | @Override 58 | protected void onDestroy() { 59 | super.onDestroy(); 60 | 61 | //注销消息接收 62 | JMessageClient.unRegisterEventReceiver(this); 63 | } 64 | 65 | 66 | public void onEventMainThread(LoginStateChangeEvent event){ 67 | LoginStateChangeEvent.Reason reason = event.getReason(); 68 | if(reason == LoginStateChangeEvent.Reason.user_logout){ 69 | L.t("登录失效,重新登录"); 70 | }else if(reason == LoginStateChangeEvent.Reason.user_password_change){ 71 | L.t("修改密码,重新登录"); 72 | } 73 | 74 | if(!isFinishing()){ 75 | JMessageClient.logout(); 76 | /* Intent myIntent = new Intent(this, LoginRegisterActivity.class); 77 | startActivity(myIntent); 78 | 79 | App.app().getUser().clearUser(); 80 | finish();*/ 81 | } 82 | 83 | 84 | 85 | } 86 | 87 | 88 | public static List friendApply = new ArrayList<>(); 89 | 90 | public void onEvent(ContactNotifyEvent event){ 91 | if(event.getType() == ContactNotifyEvent.Type.invite_received){ 92 | 93 | boolean has = false; 94 | 95 | for(int i= 0 ;i < friendApply.size() ;i++){ 96 | if(friendApply.get(i).getFromUsername().equals(event.getFromUsername())){ 97 | has = true; 98 | } 99 | } 100 | if(!has){ 101 | friendApply.add(event); 102 | L.t("收到了好友邀请"); 103 | } 104 | 105 | } 106 | } 107 | 108 | 109 | } 110 | -------------------------------------------------------------------------------- /app/src/main/java/zzw/imtest/base/BaseFragment.java: -------------------------------------------------------------------------------- 1 | package zzw.imtest.base; 2 | 3 | 4 | import android.app.ProgressDialog; 5 | import android.os.Bundle; 6 | import android.view.LayoutInflater; 7 | import android.view.View; 8 | import android.view.ViewGroup; 9 | 10 | import androidx.annotation.NonNull; 11 | import androidx.annotation.Nullable; 12 | import androidx.fragment.app.Fragment; 13 | 14 | 15 | public abstract class BaseFragment extends Fragment { 16 | 17 | public abstract int getLayoutId(); 18 | 19 | 20 | @Nullable 21 | @Override 22 | public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { 23 | 24 | return inflater.inflate(getLayoutId(), container, false); 25 | } 26 | 27 | @Override 28 | public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { 29 | super.onViewCreated(view, savedInstanceState); 30 | initData(); 31 | initView(); 32 | } 33 | 34 | 35 | protected abstract void initView(); 36 | 37 | protected abstract void initData(); 38 | 39 | 40 | } 41 | -------------------------------------------------------------------------------- /app/src/main/java/zzw/imtest/bean/ChatBean.java: -------------------------------------------------------------------------------- 1 | package zzw.imtest.bean; 2 | 3 | import com.chad.library.adapter.base.entity.MultiItemEntity; 4 | 5 | import cn.jpush.im.android.api.model.Message; 6 | 7 | public class ChatBean implements MultiItemEntity { 8 | 9 | public static final int TEXT_SEND = 1; 10 | public static final int TEXT_RECEIVE = 2; 11 | public static final int IMG_SEND = 3; 12 | public static final int IMG_RECEIVE = 4; 13 | public static final int VOICE_SEND = 5; 14 | public static final int VOICE_RECEIVE = 6; 15 | public static final int FILE_SEND = 7; 16 | public static final int FILE_RECEIVE = 8; 17 | public static final int REDP_SEND = 9; 18 | public static final int REDP_RECEIVE = 10; 19 | 20 | public static final int ADDRESS_SEND = 11; 21 | public static final int ADDRESS_RECEIVE = 12; 22 | 23 | public static final int CARD_SEND = 13; 24 | public static final int CARD_RECEIVE = 14; 25 | 26 | public static final int VIDEO_SEND = 15; 27 | public static final int VIDEO_RECEIVE = 16; 28 | 29 | public static final int GROUP_INVITA_SEND = 17; 30 | public static final int GROUP_INVITA_RECEIVE = 18; 31 | 32 | public static final int VIDEO_PHONE_SEND = 19; 33 | public static final int VIDEO_PHONE_RECEIVE = 20; 34 | 35 | public static final int RETRACT = 99; 36 | 37 | public int itemType=1; 38 | // public ChatImgBean chatImgBean; 39 | public Message message; 40 | public boolean upload=true; 41 | 42 | 43 | 44 | 45 | /* 46 | public ChatBean(ChatImgBean chatImgBean,int type){ 47 | this.chatImgBean=chatImgBean; 48 | this.itemType=type; 49 | } 50 | */ 51 | 52 | public ChatBean(Message message, int type){ 53 | this.message=message; 54 | this.itemType=type; 55 | } 56 | 57 | @Override 58 | public int getItemType() { 59 | return itemType; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /app/src/main/java/zzw/imtest/bean/ChatOptionBean.java: -------------------------------------------------------------------------------- 1 | package zzw.imtest.bean; 2 | 3 | public class ChatOptionBean { 4 | public ChatOptionBean(int i){ 5 | this.img=i; 6 | } 7 | public int img; 8 | } 9 | -------------------------------------------------------------------------------- /app/src/main/java/zzw/imtest/bean/NewGroupBean.java: -------------------------------------------------------------------------------- 1 | package zzw.imtest.bean; 2 | 3 | import cn.jpush.im.android.api.model.UserInfo; 4 | 5 | public class NewGroupBean { 6 | 7 | public NewGroupBean(){ 8 | 9 | } 10 | public NewGroupBean(UserInfo info){ 11 | userInfo = info; 12 | } 13 | public UserInfo userInfo; 14 | public boolean select=false; 15 | } 16 | -------------------------------------------------------------------------------- /app/src/main/java/zzw/imtest/constant/VariableName.java: -------------------------------------------------------------------------------- 1 | package zzw.imtest.constant; 2 | 3 | 4 | 5 | public class VariableName { 6 | 7 | public static boolean DEBUG=false; 8 | 9 | public final static String JIGUANG_APP_KEY = "1d695fabfbb3660ef6d4b267"; 10 | public final static String USERNAME = "USERNAME"; 11 | public final static String PASSWORD = "PASSWORD"; 12 | public final static String PHONE = "PHONE"; 13 | public final static String EMAIL = "EMAIL"; 14 | public final static String PW = "PW"; 15 | public final static String CODE = "CODE"; 16 | public final static String ACCOUNT = "ACCOUNT"; 17 | public final static String shop_type_id = "shop_type_id"; 18 | public final static String shop_item_id = "shop_item_id"; 19 | public final static String shop_user_name = "shop_user_name"; 20 | public final static String shop_user_password = "shop_user_password"; 21 | public final static String shop_user_password_confirmation = "shop_user_password_confirmation"; 22 | public final static String identity_number = "identity_number"; 23 | public final static String identity_name = "identity_name"; 24 | public final static String identity_positive_img = "identity_positive_img"; 25 | public final static String identity_back_img = "identity_back_img"; 26 | public final static String DATA = "DATA"; 27 | public final static String DATA_TWO = "DATA_TWO"; 28 | public final static String DATA_THREE = "DATA_THREE"; 29 | public final static String DATA_FOUR = "DATA_FOUR"; 30 | public final static String DATA_FIVE = "DATA_FIVE"; 31 | public final static String DATA_SIX = "DATA_SIX"; 32 | 33 | public final static String TITLE = "TITLE"; 34 | public final static String TYPE = "TYPE"; 35 | public final static String REDP_STATE = "REDP_STATE"; 36 | public final static String PRODUCT = "PRODUCT"; 37 | 38 | public final static String NEW_MESSAGE = "NEW_MESSAGE"; 39 | 40 | public final static String APP_ID = "wxa565ac43c8c84732"; 41 | public static String FILE_DIR = "sdcard/JChatDemo/recvFiles/"; 42 | public static String PICTURE_DIR = "sdcard/JChatDemo/pictures/"; 43 | 44 | public final static String IMG = "IMG"; 45 | public final static String VIDEO = "VIDEO"; 46 | 47 | public final static int DECIMAL_NUMBER = 2; 48 | 49 | public final static int REQUEST_CODE_ONE = 10086; 50 | public final static int REQUEST_CODE_TWO = 10087; 51 | public final static int REQUEST_CODE_THREE = 10088; 52 | public final static int SCROLL_BOTTOM = 10089; 53 | public final static int REQUEST_CODE_FOUR = 10090; 54 | public final static int HIDEN_BOTTOM = 10091; 55 | public final static int SHOW_BOTTOM = 10092; 56 | 57 | public final static String RESULT = "RESULT"; 58 | 59 | 60 | 61 | public final static int SINGLE= 0; 62 | public final static int GROUP= 1; 63 | 64 | 65 | public final static int NEW_GROUP= 0; 66 | public final static int PART_VISIBLE= 1; 67 | public final static int PART_INVISIBLE= 2; 68 | public final static int GROUP_ADD= 3; 69 | 70 | 71 | public final static String RED_PACKEGE = "RED_PACKEGE"; 72 | public final static String ADDRESS = "ADDRESS"; 73 | public final static String CARD = "CARD"; 74 | public final static String INVITATION = "INVITATION"; 75 | public final static String VIDEO_PHONE = "VIDEO_PHONE"; 76 | 77 | } 78 | -------------------------------------------------------------------------------- /app/src/main/java/zzw/imtest/service/IMService.java: -------------------------------------------------------------------------------- 1 | package zzw.imtest.service; 2 | 3 | import cn.jpush.android.service.JCommonService; 4 | 5 | public class IMService extends JCommonService { 6 | } 7 | -------------------------------------------------------------------------------- /app/src/main/java/zzw/imtest/ui/chat/PreviewImageActivity.kt: -------------------------------------------------------------------------------- 1 | package zzw.imtest.ui.chat 2 | 3 | import androidx.appcompat.app.AppCompatActivity 4 | import android.os.Bundle 5 | import com.bumptech.glide.Glide 6 | import kotlinx.android.synthetic.main.activity_preview.* 7 | import zzw.imtest.R 8 | import zzw.imtest.base.BaseActivity 9 | import zzw.imtest.constant.VariableName 10 | 11 | class PreviewImageActivity : BaseActivity() { 12 | override fun initData() { 13 | 14 | } 15 | 16 | override fun initView() { 17 | 18 | Glide.with(this).load(intent.getStringExtra(VariableName.DATA)).into(iv) 19 | 20 | } 21 | 22 | override fun getLayoutId(): Int { 23 | return R.layout.activity_preview 24 | } 25 | 26 | 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/java/zzw/imtest/ui/chat/UserDetailActivity.kt: -------------------------------------------------------------------------------- 1 | package zzw.imtest.ui.chat 2 | 3 | import android.content.Intent 4 | import android.graphics.Bitmap 5 | import androidx.appcompat.app.AppCompatActivity 6 | import android.os.Bundle 7 | import cn.jpush.im.android.api.JMessageClient 8 | import cn.jpush.im.android.api.callback.GetAvatarBitmapCallback 9 | import cn.jpush.im.android.api.callback.GetUserInfoCallback 10 | import cn.jpush.im.android.api.model.UserInfo 11 | import cn.jpush.im.api.BasicCallback 12 | import com.mylhyl.circledialog.CircleDialog 13 | import kotlinx.android.synthetic.main.activity_user_detail.* 14 | import zzw.imtest.R 15 | import zzw.imtest.base.BaseActivity 16 | import zzw.imtest.constant.VariableName 17 | import zzw.imtest.util.L 18 | 19 | class UserDetailActivity : BaseActivity() { 20 | 21 | var userName = "" 22 | var userInfo:UserInfo ?= null 23 | 24 | override fun initData() { 25 | userName = intent.getStringExtra(VariableName.DATA) 26 | } 27 | 28 | override fun initView() { 29 | 30 | JMessageClient.getUserInfo(userName,object :GetUserInfoCallback(){ 31 | override fun gotResult(p0: Int, p1: String?, p2: UserInfo?) { 32 | if(p0==0){ 33 | userInfo = p2 34 | tv_name.text = L.getName(p2) 35 | p2?.getAvatarBitmap(object :GetAvatarBitmapCallback(){ 36 | override fun gotResult(p0: Int, p1: String?, p2: Bitmap?) { 37 | if(p0 == 0){ 38 | iv_head.setImageBitmap(p2) 39 | } 40 | } 41 | 42 | }) 43 | } 44 | } 45 | 46 | }) 47 | 48 | 49 | 50 | 51 | select_delete.setOnClickListener { 52 | 53 | CircleDialog.Builder() 54 | .setCanceledOnTouchOutside(false) 55 | .setCancelable(false) 56 | .setTitle("删除好友") 57 | .setText("确认删除该好友吗?") 58 | .setNegative("取消", null) 59 | .setPositive("确定") { v -> 60 | 61 | userInfo?.removeFromFriendList(object :BasicCallback(){ 62 | override fun gotResult(p0: Int, p1: String?) { 63 | if(p0 == 0){ 64 | L.t("删除好友成功") 65 | }else{ 66 | L.t("删除好友失败") 67 | } 68 | } 69 | }) 70 | 71 | 72 | } 73 | .show(supportFragmentManager) 74 | 75 | 76 | } 77 | 78 | 79 | tv_confirm.setOnClickListener { 80 | var myIntent = Intent(this@UserDetailActivity,ChatActivity::class.java) 81 | myIntent.putExtra(VariableName.TYPE, VariableName.SINGLE) 82 | myIntent.putExtra(VariableName.DATA,userInfo?.userName) 83 | myIntent.putExtra(VariableName.DATA_TWO, L.getName(userInfo)) 84 | startActivity(myIntent) 85 | } 86 | 87 | } 88 | 89 | override fun getLayoutId(): Int { 90 | return R.layout.activity_user_detail 91 | } 92 | 93 | 94 | } 95 | -------------------------------------------------------------------------------- /app/src/main/java/zzw/imtest/ui/chat/VideoPlayerDetailedActivity.java: -------------------------------------------------------------------------------- 1 | package zzw.imtest.ui.chat; 2 | 3 | import android.app.Activity; 4 | import android.content.res.Configuration; 5 | import android.os.Bundle; 6 | import android.util.Log; 7 | 8 | 9 | import androidx.core.app.ActivityCompat; 10 | 11 | import chuangyuan.ycj.videolibrary.video.ExoUserPlayer; 12 | import chuangyuan.ycj.videolibrary.widget.VideoPlayerView; 13 | import zzw.imtest.R; 14 | 15 | public class VideoPlayerDetailedActivity extends Activity { 16 | 17 | private ExoUserPlayer exoPlayerManager; 18 | private VideoPlayerView videoPlayerView; 19 | private static final String TAG = "OfficeDetailedActivity"; 20 | String[] test; 21 | 22 | @Override 23 | 24 | protected void onCreate(Bundle savedInstanceState) { 25 | super.onCreate(savedInstanceState); 26 | setContentView(R.layout.video_layout); 27 | videoPlayerView = findViewById(R.id.exo_play_context_id); 28 | exoPlayerManager = new ExoUserPlayer(this, videoPlayerView); 29 | //设置视频标题 30 | videoPlayerView.setTitle("视频标题"); 31 | exoPlayerManager.setPlayUri(getIntent().getStringExtra("url")); 32 | exoPlayerManager.startPlayer(); 33 | 34 | 35 | } 36 | 37 | @Override 38 | public void onResume() { 39 | super.onResume(); 40 | Log.d(TAG, "onResume"); 41 | exoPlayerManager.onResume(); 42 | } 43 | 44 | @Override 45 | public void onPause() { 46 | super.onPause(); 47 | Log.d(TAG, "onPause"); 48 | exoPlayerManager.onPause(); 49 | } 50 | 51 | 52 | @Override 53 | protected void onDestroy() { 54 | super.onDestroy(); 55 | exoPlayerManager.onDestroy(); 56 | 57 | } 58 | 59 | @Override 60 | public void onConfigurationChanged(Configuration newConfig) { 61 | // exoPlayerManager.onConfigurationChanged(newConfig);//横竖屏切换 62 | super.onConfigurationChanged(newConfig); 63 | } 64 | 65 | @Override 66 | public void onBackPressed() { 67 | if (exoPlayerManager.onBackPressed()) { 68 | ActivityCompat.finishAfterTransition(this); 69 | exoPlayerManager.onDestroy(); 70 | } 71 | } 72 | } -------------------------------------------------------------------------------- /app/src/main/java/zzw/imtest/ui/login/LoginActivity.kt: -------------------------------------------------------------------------------- 1 | package zzw.imtest.ui.login 2 | 3 | import android.content.Intent 4 | import android.text.TextUtils 5 | import android.widget.Toast 6 | import cn.jpush.im.android.api.JMessageClient 7 | import cn.jpush.im.api.BasicCallback 8 | import kotlinx.android.synthetic.main.activity_login.* 9 | import kotlinx.android.synthetic.main.include_toolbar.* 10 | import zzw.imtest.App 11 | import zzw.imtest.ui.MainActivity 12 | import zzw.imtest.R 13 | import zzw.imtest.base.BaseActivity 14 | import zzw.imtest.constant.VariableName 15 | import zzw.imtest.util.L 16 | import zzw.imtest.util.SharedPreferencesHelper 17 | 18 | class LoginActivity : BaseActivity() { 19 | override fun initData() { 20 | 21 | } 22 | 23 | override fun initView() { 24 | 25 | toolbar.run { 26 | setSupportActionBar(this) 27 | title = "登录" 28 | setNavigationIcon(R.drawable.ic_close) 29 | setNavigationOnClickListener { finish() } 30 | } 31 | 32 | 33 | login_sub.setOnClickListener { 34 | if(TextUtils.isEmpty(login_username.text.toString())){ 35 | Toast.makeText(this@LoginActivity,"请输入账号", Toast.LENGTH_SHORT).show() 36 | return@setOnClickListener 37 | } 38 | if(TextUtils.isEmpty(login_pwd.text.toString())){ 39 | Toast.makeText(this@LoginActivity,"请输入密码", Toast.LENGTH_SHORT).show() 40 | return@setOnClickListener 41 | } 42 | JMessageClient.login(login_username.text.toString(),login_pwd.text.toString(),object : 43 | BasicCallback(){ 44 | override fun gotResult(p0: Int, p1: String?) { 45 | if(p0==0){ 46 | 47 | 48 | App.sharedPreferencesHelper.put(VariableName.USERNAME,login_username.text.toString()) 49 | App.sharedPreferencesHelper.put(VariableName.PASSWORD,login_pwd.text.toString()) 50 | 51 | 52 | L.t("登录成功") 53 | var myIntent= Intent(this@LoginActivity, MainActivity::class.java) 54 | startActivity(myIntent) 55 | finish() 56 | 57 | }else{ 58 | L.t(p1) 59 | 60 | } 61 | 62 | 63 | 64 | } 65 | }) 66 | 67 | } 68 | 69 | login_goregister.setOnClickListener { 70 | var myIntent = Intent(this@LoginActivity,RegisterActivity::class.java) 71 | startActivity(myIntent) 72 | } 73 | 74 | } 75 | 76 | override fun getLayoutId(): Int { 77 | return R.layout.activity_login 78 | } 79 | 80 | 81 | } 82 | -------------------------------------------------------------------------------- /app/src/main/java/zzw/imtest/ui/login/RegisterActivity.kt: -------------------------------------------------------------------------------- 1 | package zzw.imtest.ui.login 2 | 3 | import android.text.TextUtils 4 | import android.widget.Toast 5 | import cn.jpush.im.android.api.JMessageClient 6 | import cn.jpush.im.api.BasicCallback 7 | import kotlinx.android.synthetic.main.activity_register.* 8 | import kotlinx.android.synthetic.main.include_toolbar.* 9 | import zzw.imtest.R 10 | import zzw.imtest.base.BaseActivity 11 | import zzw.imtest.util.L 12 | 13 | class RegisterActivity : BaseActivity() { 14 | override fun initData() { 15 | 16 | } 17 | 18 | override fun initView() { 19 | toolbar.run { 20 | setSupportActionBar(this) 21 | title = "注册" 22 | setNavigationIcon(R.drawable.ic_back) 23 | setNavigationOnClickListener { finish() } 24 | } 25 | 26 | register_sub.setOnClickListener { 27 | if(TextUtils.isEmpty(register_username.text.toString())){ 28 | Toast.makeText(this@RegisterActivity,"请输入账号", Toast.LENGTH_SHORT).show() 29 | return@setOnClickListener 30 | } 31 | if(TextUtils.isEmpty(register_pwd.text.toString())){ 32 | Toast.makeText(this@RegisterActivity,"请输入密码", Toast.LENGTH_SHORT).show() 33 | return@setOnClickListener 34 | } 35 | if(TextUtils.isEmpty(register_pwd1.text.toString())){ 36 | Toast.makeText(this@RegisterActivity,"请输入密码", Toast.LENGTH_SHORT).show() 37 | return@setOnClickListener 38 | } 39 | JMessageClient.register(register_username.text.toString(),register_pwd.text.toString(),object : 40 | BasicCallback(){ 41 | override fun gotResult(p0: Int, p1: String?) { 42 | 43 | if(p0==0){ 44 | L.t("注册成功") 45 | finish() 46 | 47 | }else{ 48 | L.t(p1) 49 | 50 | } 51 | } 52 | }) 53 | 54 | } 55 | 56 | } 57 | 58 | override fun getLayoutId(): Int { 59 | return R.layout.activity_register 60 | } 61 | 62 | 63 | } 64 | -------------------------------------------------------------------------------- /app/src/main/java/zzw/imtest/ui/maillist/GroupActivity.kt: -------------------------------------------------------------------------------- 1 | package zzw.imtest.ui.maillist 2 | 3 | import android.content.Intent 4 | import android.graphics.Bitmap 5 | import androidx.appcompat.app.AppCompatActivity 6 | import android.os.Bundle 7 | import android.widget.ImageView 8 | import androidx.recyclerview.widget.LinearLayoutManager 9 | import cn.jpush.im.android.api.JMessageClient 10 | import cn.jpush.im.android.api.callback.GetAvatarBitmapCallback 11 | import cn.jpush.im.android.api.callback.GetGroupIDListCallback 12 | import cn.jpush.im.android.api.model.Conversation 13 | import cn.jpush.im.android.api.model.GroupInfo 14 | import kotlinx.android.synthetic.main.activity_group.* 15 | import zzw.imtest.R 16 | import zzw.imtest.adapter.GroupAdapter 17 | import zzw.imtest.base.BaseActivity 18 | import zzw.imtest.constant.VariableName 19 | import zzw.imtest.ui.chat.ChatActivity 20 | import zzw.imtest.util.L 21 | 22 | class GroupActivity : BaseActivity() { 23 | 24 | var list: MutableList = mutableListOf() 25 | var groupAdapter: GroupAdapter = GroupAdapter(R.layout.item_group,list) 26 | 27 | override fun initData() { 28 | JMessageClient.getGroupIDList(object : GetGroupIDListCallback(){ 29 | override fun gotResult(p0: Int, p1: String?, p2: MutableList?) { 30 | if(L.notNull(p2)){ 31 | 32 | list.clear() 33 | list.addAll(p2!!) 34 | 35 | groupAdapter?.notifyDataSetChanged() 36 | 37 | } 38 | } 39 | 40 | }) 41 | 42 | } 43 | 44 | override fun initView() { 45 | recyc.adapter=groupAdapter 46 | recyc.layoutManager= LinearLayoutManager(this) 47 | 48 | groupAdapter.setOnItemClickListener { adapter, view, position -> 49 | 50 | var conversation: Conversation? = JMessageClient.getGroupConversation(list.get(position)) 51 | if (conversation == null) { 52 | conversation = Conversation.createGroupConversation(list.get(position)) 53 | } 54 | val groupInfo = conversation!!.targetInfo as GroupInfo 55 | 56 | 57 | var myIntent= Intent(this@GroupActivity, ChatActivity::class.java) 58 | myIntent.putExtra(VariableName.TYPE, VariableName.GROUP) 59 | myIntent.putExtra(VariableName.DATA,list.get(position)) 60 | myIntent.putExtra(VariableName.DATA_TWO, groupInfo.groupName) 61 | startActivity(myIntent) 62 | } 63 | } 64 | 65 | override fun getLayoutId(): Int { 66 | return R.layout.activity_group 67 | } 68 | 69 | 70 | } 71 | -------------------------------------------------------------------------------- /app/src/main/java/zzw/imtest/ui/maillist/MailListFragment.kt: -------------------------------------------------------------------------------- 1 | package zzw.imtest.ui.maillist 2 | 3 | import android.content.Intent 4 | import android.text.TextUtils 5 | import androidx.recyclerview.widget.LinearLayoutManager 6 | import cn.jpush.im.android.api.ContactManager 7 | import cn.jpush.im.android.api.JMessageClient 8 | import cn.jpush.im.android.api.callback.GetUserInfoListCallback 9 | import cn.jpush.im.android.api.model.Conversation 10 | import cn.jpush.im.android.api.model.UserInfo 11 | import kotlinx.android.synthetic.main.fragment_chat.* 12 | import kotlinx.android.synthetic.main.fragment_chat.recyc 13 | import kotlinx.android.synthetic.main.fragment_mail_list.* 14 | import zzw.imtest.R 15 | import zzw.imtest.adapter.ConversationAdapter 16 | import zzw.imtest.adapter.FriendAdapter 17 | import zzw.imtest.base.BaseFragment 18 | import zzw.imtest.constant.VariableName 19 | import zzw.imtest.ui.chat.ChatActivity 20 | import zzw.imtest.ui.chat.UserDetailActivity 21 | 22 | class MailListFragment:BaseFragment(){ 23 | 24 | var list:MutableList = mutableListOf() 25 | var adapter: FriendAdapter = FriendAdapter(R.layout.item_mail_list_content,list) 26 | 27 | override fun initData() { 28 | 29 | 30 | 31 | 32 | } 33 | 34 | override fun initView() { 35 | 36 | recyc.layoutManager= LinearLayoutManager(activity) 37 | recyc.adapter= adapter 38 | recyc.setHasFixedSize(true) 39 | 40 | 41 | adapter.setOnItemClickListener { adapter, view, position -> 42 | 43 | var myIntent = Intent(activity,UserDetailActivity::class.java) 44 | myIntent.putExtra(VariableName.DATA,list.get(position).userName) 45 | startActivity(myIntent) 46 | 47 | 48 | 49 | } 50 | 51 | 52 | 53 | ll_new_friend.setOnClickListener { 54 | var myIntent = Intent(activity,NewFriendActivity::class.java) 55 | startActivity(myIntent) 56 | } 57 | 58 | 59 | ll_group.setOnClickListener { 60 | var myIntent = Intent(activity,GroupActivity::class.java) 61 | startActivity(myIntent) 62 | } 63 | 64 | 65 | } 66 | 67 | override fun onResume() { 68 | super.onResume() 69 | refresh() 70 | } 71 | 72 | fun refresh(){ 73 | ContactManager.getFriendList(object : GetUserInfoListCallback() { 74 | override fun gotResult(i: Int, s: String, data: List) { 75 | if (i == 0) { 76 | list.clear() 77 | list.addAll(data) 78 | 79 | adapter.notifyDataSetChanged() 80 | } 81 | } 82 | }) 83 | 84 | } 85 | 86 | override fun getLayoutId(): Int { 87 | return R.layout.fragment_mail_list 88 | } 89 | 90 | 91 | } 92 | -------------------------------------------------------------------------------- /app/src/main/java/zzw/imtest/ui/maillist/NewFriendActivity.kt: -------------------------------------------------------------------------------- 1 | package zzw.imtest.ui.maillist 2 | 3 | import androidx.appcompat.app.AppCompatActivity 4 | import android.os.Bundle 5 | import androidx.recyclerview.widget.LinearLayoutManager 6 | import cn.jpush.im.android.api.ContactManager 7 | import cn.jpush.im.android.api.callback.GetUserInfoListCallback 8 | import cn.jpush.im.android.api.event.ContactNotifyEvent 9 | import cn.jpush.im.android.api.model.UserInfo 10 | import com.mylhyl.circledialog.CircleDialog 11 | import kotlinx.android.synthetic.main.activity_new_friend.* 12 | import zzw.imtest.R 13 | import zzw.imtest.adapter.NewFriendAdapter 14 | import zzw.imtest.base.BaseActivity 15 | import zzw.imtest.util.L 16 | import cn.jpush.im.api.BasicCallback 17 | 18 | 19 | 20 | class NewFriendActivity : BaseActivity() { 21 | 22 | var list:MutableList = mutableListOf() 23 | var adapter: NewFriendAdapter = NewFriendAdapter(R.layout.item_new_friend,list) 24 | 25 | override fun initData() { 26 | 27 | } 28 | 29 | override fun initView() { 30 | 31 | list.addAll(BaseActivity.friendApply) 32 | 33 | recyc.adapter = adapter 34 | recyc.layoutManager = LinearLayoutManager(this) 35 | 36 | 37 | adapter.setOnItemClickListener { adapter, view, position -> 38 | 39 | 40 | CircleDialog.Builder() 41 | .setTitle("好友申请") 42 | .setText("是否通过好友申请") 43 | .setNegative("取消", null) 44 | .setPositive("确定") { v -> 45 | ContactManager.acceptInvitation( 46 | list.get(0).fromUsername, 47 | list.get(0).getfromUserAppKey(), 48 | object : BasicCallback() { 49 | override fun gotResult(responseCode: Int, responseMessage: String) { 50 | if (0 == responseCode) { 51 | L.t("接收好友请求成功") 52 | list.removeAt(position) 53 | adapter.notifyItemRemoved(position) 54 | } else { 55 | //接收好友请求失败 56 | } 57 | } 58 | }) 59 | } 60 | .show(getSupportFragmentManager()) 61 | } 62 | 63 | 64 | 65 | 66 | } 67 | 68 | override fun getLayoutId(): Int { 69 | 70 | return R.layout.activity_new_friend 71 | } 72 | 73 | 74 | 75 | } 76 | -------------------------------------------------------------------------------- /app/src/main/java/zzw/imtest/ui/my/CodeActivity.kt: -------------------------------------------------------------------------------- 1 | package zzw.imtest.ui.my 2 | 3 | import android.app.Activity 4 | import android.graphics.Bitmap 5 | import android.graphics.Canvas 6 | import androidx.appcompat.app.AppCompatActivity 7 | import android.os.Bundle 8 | import android.text.TextUtils 9 | import android.view.View 10 | import cn.jpush.im.android.api.JMessageClient 11 | import cn.jpush.im.android.api.callback.GetAvatarBitmapCallback 12 | import com.mylhyl.zxing.scanner.encode.QREncode 13 | import io.reactivex.ObservableOnSubscribe 14 | import io.reactivex.android.schedulers.AndroidSchedulers 15 | import io.reactivex.schedulers.Schedulers 16 | import kotlinx.android.synthetic.main.activity_code.* 17 | import me.leefeng.promptlibrary.PromptDialog 18 | import zzw.imtest.R 19 | import zzw.imtest.base.BaseActivity 20 | import zzw.imtest.util.L 21 | import zzw.imtest.util.SaveBitmapToPhoto 22 | 23 | class CodeActivity : BaseActivity() { 24 | override fun initData() { 25 | 26 | } 27 | 28 | override fun initView() { 29 | 30 | var userInfo = JMessageClient.getMyInfo() 31 | 32 | userInfo.getAvatarBitmap(object :GetAvatarBitmapCallback(){ 33 | override fun gotResult(p0: Int, p1: String?, p2: Bitmap?) { 34 | if(p0 == 0){ 35 | iv_logo.setImageBitmap(p2) 36 | } 37 | } 38 | 39 | }) 40 | 41 | 42 | 43 | io.reactivex.Observable.create(ObservableOnSubscribe { e -> 44 | 45 | 46 | var bitmap = QREncode.Builder(this) 47 | .setColor((this).resources.getColor(R.color.black))//二维码颜色 48 | .setContents(userInfo.userName) 49 | // .setSize(500)//二维码等比大小 50 | // .setLogoBitmap(resource, 90) 51 | .build().encodeAsBitmap() 52 | e.onNext(bitmap!!) 53 | }).subscribeOn(Schedulers.newThread()) 54 | .observeOn(AndroidSchedulers.mainThread()) 55 | .subscribe { bitmap -> 56 | 57 | iv_code.setImageBitmap(bitmap) 58 | } 59 | 60 | 61 | tv_content.text = L.getName(userInfo) 62 | 63 | 64 | tv_save.setOnClickListener { 65 | var bitmap = createViewBitmap(ll) 66 | 67 | if (bitmap != null) { 68 | val dialog = PromptDialog(this) 69 | dialog.showLoading("正在保存图片") 70 | io.reactivex.Observable.create(ObservableOnSubscribe { e -> 71 | SaveBitmapToPhoto.saveImageToGallery(this,bitmap!!, System.currentTimeMillis().toString()+".png") 72 | // saveBitmap(bitmap!!, System.currentTimeMillis().toString() + "") 73 | e.onNext(bitmap!!) 74 | }).subscribeOn(Schedulers.newThread()) 75 | .observeOn(AndroidSchedulers.mainThread()) 76 | .subscribe { 77 | dialog.dismiss() 78 | L.t("保存完毕") 79 | } 80 | } 81 | 82 | } 83 | 84 | 85 | } 86 | 87 | fun createViewBitmap(v: View): Bitmap { 88 | val bitmap = Bitmap.createBitmap( 89 | v.getWidth(), v.getHeight(), 90 | Bitmap.Config.ARGB_8888 91 | ) 92 | val canvas = Canvas(bitmap) 93 | v.draw(canvas) 94 | return bitmap 95 | } 96 | 97 | 98 | override fun getLayoutId(): Int { 99 | return R.layout.activity_code 100 | } 101 | 102 | 103 | } 104 | -------------------------------------------------------------------------------- /app/src/main/java/zzw/imtest/ui/my/MyFragment.kt: -------------------------------------------------------------------------------- 1 | package zzw.imtest.ui.my 2 | 3 | import android.content.Intent 4 | import android.graphics.Bitmap 5 | import android.text.TextUtils 6 | import cn.jpush.im.android.api.JMessageClient 7 | import cn.jpush.im.android.api.callback.GetAvatarBitmapCallback 8 | import kotlinx.android.synthetic.main.fragment_my.* 9 | import zzw.imtest.App 10 | import zzw.imtest.R 11 | import zzw.imtest.base.BaseFragment 12 | import zzw.imtest.ui.login.LoginActivity 13 | import zzw.imtest.util.L 14 | 15 | class MyFragment:BaseFragment(){ 16 | override fun initData() { 17 | 18 | } 19 | 20 | override fun initView() { 21 | 22 | 23 | rl_info.setOnClickListener { 24 | var myIntent= Intent(activity,PersonInformActivity::class.java) 25 | startActivity(myIntent) 26 | } 27 | 28 | tv_exit.setOnClickListener { 29 | 30 | App.sharedPreferencesHelper.clear() 31 | 32 | var myIntent= Intent(activity,LoginActivity::class.java) 33 | startActivity(myIntent) 34 | activity?.finish() 35 | } 36 | 37 | rl_scanner.setOnClickListener { 38 | var myIntent= Intent(activity,ScannerActivity::class.java) 39 | startActivity(myIntent) 40 | } 41 | 42 | 43 | } 44 | 45 | override fun onResume() { 46 | super.onResume() 47 | getData() 48 | } 49 | 50 | fun getData(){ 51 | var userInfo = JMessageClient.getMyInfo() 52 | 53 | userInfo.getAvatarBitmap(object :GetAvatarBitmapCallback(){ 54 | override fun gotResult(p0: Int, p1: String?, p2: Bitmap?) { 55 | if(p0 == 0){ 56 | iv_head.setImageBitmap(p2) 57 | } 58 | } 59 | }) 60 | 61 | tv_username.text = L.getName(userInfo) 62 | } 63 | 64 | override fun getLayoutId(): Int { 65 | return R.layout.fragment_my 66 | } 67 | 68 | } 69 | -------------------------------------------------------------------------------- /app/src/main/java/zzw/imtest/util/InfoLayout.java: -------------------------------------------------------------------------------- 1 | package zzw.imtest.util; 2 | 3 | import android.content.Context; 4 | import android.content.res.TypedArray; 5 | import android.util.AttributeSet; 6 | import android.view.LayoutInflater; 7 | import android.view.View; 8 | import android.widget.ImageView; 9 | import android.widget.RelativeLayout; 10 | import android.widget.TextView; 11 | 12 | import zzw.imtest.R; 13 | 14 | 15 | public class InfoLayout extends RelativeLayout { 16 | 17 | 18 | public TextView tv_title,tv_content; 19 | 20 | ImageView iv; 21 | 22 | public InfoLayout(Context context) { 23 | super(context); 24 | } 25 | 26 | public InfoLayout(Context context, AttributeSet attrs) { 27 | super(context, attrs); 28 | 29 | LayoutInflater.from(context).inflate(R.layout.layout_info, this); 30 | 31 | tv_title=(TextView)findViewById(R.id.tv_title); 32 | tv_content=(TextView)findViewById(R.id.tv_content); 33 | iv=(ImageView)findViewById(R.id.iv); 34 | 35 | TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.InfoLayout); 36 | String title = typedArray.getString(R.styleable.InfoLayout_InfoLayout_title); 37 | String content = typedArray.getString(R.styleable.InfoLayout_InfoLayout_content); 38 | boolean showiv = typedArray.getBoolean(R.styleable.InfoLayout_InfoLayout_showiv,false); 39 | typedArray.recycle();//释放资源 40 | 41 | 42 | tv_title.setText(title); 43 | tv_content.setText(content); 44 | 45 | if(showiv){ 46 | tv_content.setVisibility(View.INVISIBLE); 47 | iv.setVisibility(View.VISIBLE); 48 | }else{ 49 | 50 | } 51 | 52 | 53 | } 54 | 55 | 56 | 57 | } -------------------------------------------------------------------------------- /app/src/main/java/zzw/imtest/util/L.java: -------------------------------------------------------------------------------- 1 | package zzw.imtest.util; 2 | 3 | import android.text.TextUtils; 4 | import android.util.Log; 5 | import android.widget.Toast; 6 | 7 | import java.util.List; 8 | 9 | import cn.jpush.im.android.api.model.UserInfo; 10 | import zzw.imtest.App; 11 | 12 | public class L { 13 | 14 | public static void v(String info){ 15 | Log.v("BitPai===>> ",info); 16 | } 17 | public static void v(String sort, String info){ 18 | Log.v(sort,info); 19 | } 20 | 21 | public static void v(Class classz , String info){ 22 | Log.v(classz.getName()+"===>> ",info); 23 | } 24 | 25 | public static void t(String msg){ 26 | Toast.makeText(App.app, msg, Toast.LENGTH_SHORT).show(); 27 | } 28 | public static void tLong(String msg){ 29 | Toast.makeText(App.app, msg, Toast.LENGTH_LONG).show(); 30 | } 31 | 32 | 33 | public static String getName(UserInfo userInfo){ 34 | if(userInfo == null){ 35 | return ""; 36 | } 37 | 38 | if(TextUtils.isEmpty(userInfo.getNickname())){ 39 | return userInfo.getUserName(); 40 | }else{ 41 | return userInfo.getNickname(); 42 | } 43 | } 44 | 45 | public static boolean notNull(List list){ 46 | if(list!=null&&list.size()>0){ 47 | return true; 48 | }else{ 49 | return false; 50 | } 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /app/src/main/java/zzw/imtest/util/NotificationClickEventReceiver.kt: -------------------------------------------------------------------------------- 1 | package zzw.imtest.util 2 | 3 | 4 | import android.content.Context 5 | import android.content.Intent 6 | import android.text.TextUtils 7 | import cn.jpush.im.android.api.JMessageClient 8 | import cn.jpush.im.android.api.enums.ConversationType 9 | import cn.jpush.im.android.api.event.NotificationClickEvent 10 | import cn.jpush.im.android.api.model.GroupInfo 11 | import cn.jpush.im.android.api.model.UserInfo 12 | import zzw.imtest.constant.VariableName 13 | import zzw.imtest.ui.chat.ChatActivity 14 | 15 | class NotificationClickEventReceiver(public var mContext: Context?) { 16 | 17 | init { 18 | //注册接收消息事件 19 | JMessageClient.registerEventReceiver(this) 20 | } 21 | 22 | /** 23 | * 收到消息处理 24 | * @param notificationClickEvent 通知点击事件 25 | */ 26 | fun onEvent(notificationClickEvent: NotificationClickEvent?) { 27 | if(mContext == null){ 28 | return 29 | } 30 | 31 | if (null == notificationClickEvent) { 32 | return 33 | } 34 | val msg = notificationClickEvent.message 35 | if (msg != null) { 36 | val targetId = msg.targetID 37 | val appKey = msg.fromAppKey 38 | val type = msg.targetType 39 | 40 | 41 | 42 | val notificationIntent = Intent(mContext, ChatActivity::class.java) 43 | if (type == ConversationType.single) { 44 | notificationIntent.putExtra(VariableName.TYPE,VariableName.SINGLE) 45 | notificationIntent.putExtra(VariableName.DATA, (msg.targetInfo as UserInfo).userName) 46 | notificationIntent.putExtra(VariableName.DATA_TWO, L.getName(msg.targetInfo as UserInfo)) 47 | notificationIntent.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP 48 | mContext?.startActivity(notificationIntent) 49 | 50 | } else if(type== ConversationType.group) { 51 | notificationIntent.putExtra(VariableName.TYPE,VariableName.GROUP) 52 | notificationIntent.putExtra(VariableName.DATA, (msg.targetInfo as GroupInfo).groupID) 53 | notificationIntent.putExtra(VariableName.DATA_TWO,(msg.targetInfo as GroupInfo).groupName) 54 | notificationIntent.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP 55 | mContext?.startActivity(notificationIntent) 56 | 57 | 58 | 59 | } 60 | 61 | 62 | } 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /app/src/main/java/zzw/imtest/util/SaveBitmapToPhoto.java: -------------------------------------------------------------------------------- 1 | package zzw.imtest.util; 2 | 3 | import android.content.Context; 4 | import android.content.Intent; 5 | import android.graphics.Bitmap; 6 | import android.net.Uri; 7 | import android.os.Environment; 8 | 9 | import java.io.File; 10 | import java.io.FileOutputStream; 11 | import java.io.IOException; 12 | 13 | public class SaveBitmapToPhoto { 14 | /** 15 | * 保存图片到指定路径 16 | * 17 | * @param context 18 | * @param bitmap 要保存的图片 19 | * @param fileName 自定义图片名称 getString(R.string.app_name) + "" + System.currentTimeMillis()+".png" 20 | * @return true 成功 false失败 21 | */ 22 | public static boolean saveImageToGallery(Context context, Bitmap bitmap, String fileName) { 23 | // 保存图片至指定路径 24 | String storePath = Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator + "qrcode"; 25 | File appDir = new File(storePath); 26 | if (!appDir.exists()) { 27 | appDir.mkdir(); 28 | } 29 | File file = new File(appDir, fileName); 30 | try { 31 | FileOutputStream fos = new FileOutputStream(file); 32 | //通过io流的方式来压缩保存图片(80代表压缩20%) 33 | boolean isSuccess = bitmap.compress(Bitmap.CompressFormat.JPEG, 80, fos); 34 | fos.flush(); 35 | fos.close(); 36 | 37 | //发送广播通知系统图库刷新数据 38 | Uri uri = Uri.fromFile(file); 39 | context.sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, uri)); 40 | if (isSuccess) { 41 | return true; 42 | } else { 43 | return false; 44 | } 45 | } catch (IOException e) { 46 | e.printStackTrace(); 47 | } 48 | return false; 49 | } 50 | } -------------------------------------------------------------------------------- /app/src/main/java/zzw/imtest/util/SharedPreferencesHelper.java: -------------------------------------------------------------------------------- 1 | package zzw.imtest.util; 2 | 3 | import java.util.Map; 4 | 5 | import android.content.Context; 6 | import android.content.SharedPreferences; 7 | 8 | /** 9 | * 保存信息配置类 10 | * 11 | * @author admin 12 | */ 13 | public class SharedPreferencesHelper { 14 | private SharedPreferences sharedPreferences; 15 | /* 16 | * 保存手机里面的名字 17 | */private SharedPreferences.Editor editor; 18 | 19 | public SharedPreferencesHelper(Context context) { 20 | sharedPreferences = context.getSharedPreferences("JgIm", 21 | Context.MODE_PRIVATE); 22 | editor = sharedPreferences.edit(); 23 | } 24 | 25 | /** 26 | * 存储 27 | */ 28 | public void put(String key, Object object) { 29 | if (object instanceof String) { 30 | editor.putString(key, (String) object); 31 | } else if (object instanceof Integer) { 32 | editor.putInt(key, (Integer) object); 33 | } else if (object instanceof Boolean) { 34 | editor.putBoolean(key, (Boolean) object); 35 | } else if (object instanceof Float) { 36 | editor.putFloat(key, (Float) object); 37 | } else if (object instanceof Long) { 38 | editor.putLong(key, (Long) object); 39 | } else { 40 | editor.putString(key, object.toString()); 41 | } 42 | editor.commit(); 43 | } 44 | 45 | /** 46 | * 获取保存的数据 47 | */ 48 | public Object getSharedPreference(String key, Object defaultObject) { 49 | if (defaultObject instanceof String) { 50 | return sharedPreferences.getString(key, (String) defaultObject); 51 | } else if (defaultObject instanceof Integer) { 52 | return sharedPreferences.getInt(key, (Integer) defaultObject); 53 | } else if (defaultObject instanceof Boolean) { 54 | return sharedPreferences.getBoolean(key, (Boolean) defaultObject); 55 | } else if (defaultObject instanceof Float) { 56 | return sharedPreferences.getFloat(key, (Float) defaultObject); 57 | } else if (defaultObject instanceof Long) { 58 | return sharedPreferences.getLong(key, (Long) defaultObject); 59 | } else { 60 | return sharedPreferences.getString(key, null); 61 | } 62 | } 63 | 64 | /** 65 | * 移除某个key值已经对应的值 66 | */ 67 | public void remove(String key) { 68 | editor.remove(key); 69 | editor.commit(); 70 | } 71 | 72 | /** 73 | * 清除所有数据 74 | */ 75 | public void clear() { 76 | editor.clear(); 77 | editor.commit(); 78 | } 79 | 80 | /** 81 | * 查询某个key是否存在 82 | */ 83 | public Boolean contain(String key) { 84 | return sharedPreferences.contains(key); 85 | } 86 | 87 | /** 88 | * 返回所有的键值对 89 | */ 90 | public Map getAll() { 91 | return sharedPreferences.getAll(); 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /app/src/main/java/zzw/imtest/util/SoftKeyBoardListener.java: -------------------------------------------------------------------------------- 1 | package zzw.imtest.util; 2 | 3 | import android.app.Activity; 4 | import android.graphics.Rect; 5 | import android.view.View; 6 | import android.view.ViewTreeObserver; 7 | 8 | /** 9 | * Created by Administrator on 2018/10/18. 10 | * 软键盘的监听 11 | */ 12 | 13 | public class SoftKeyBoardListener { 14 | private View rootView;//activity的根视图 15 | int rootViewVisibleHeight;//纪录根视图的显示高度 16 | private OnSoftKeyBoardChangeListener onSoftKeyBoardChangeListener; 17 | 18 | public SoftKeyBoardListener(Activity activity) { 19 | //获取activity的根视图 20 | rootView = activity.getWindow().getDecorView(); 21 | 22 | //监听视图树中全局布局发生改变或者视图树中的某个视图的可视状态发生改变 23 | rootView.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() { 24 | @Override 25 | public void onGlobalLayout() { 26 | //获取当前根视图在屏幕上显示的大小 27 | Rect r = new Rect(); 28 | rootView.getWindowVisibleDisplayFrame(r); 29 | int visibleHeight = r.height(); 30 | if (rootViewVisibleHeight == 0) { 31 | rootViewVisibleHeight = visibleHeight; 32 | return; 33 | } 34 | 35 | //根视图显示高度没有变化,可以看作软键盘显示/隐藏状态没有改变 36 | if (rootViewVisibleHeight == visibleHeight) { 37 | return; 38 | } 39 | 40 | //根视图显示高度变小超过200,可以看作软键盘显示了 41 | if (rootViewVisibleHeight - visibleHeight > 200) { 42 | if (onSoftKeyBoardChangeListener != null) { 43 | onSoftKeyBoardChangeListener.keyBoardShow(rootViewVisibleHeight - visibleHeight); 44 | } 45 | rootViewVisibleHeight = visibleHeight; 46 | return; 47 | } 48 | 49 | //根视图显示高度变大超过200,可以看作软键盘隐藏了 50 | if (visibleHeight - rootViewVisibleHeight > 200) { 51 | if (onSoftKeyBoardChangeListener != null) { 52 | onSoftKeyBoardChangeListener.keyBoardHide(visibleHeight - rootViewVisibleHeight); 53 | } 54 | rootViewVisibleHeight = visibleHeight; 55 | return; 56 | } 57 | 58 | } 59 | }); 60 | } 61 | 62 | private void setOnSoftKeyBoardChangeListener(OnSoftKeyBoardChangeListener onSoftKeyBoardChangeListener) { 63 | this.onSoftKeyBoardChangeListener = onSoftKeyBoardChangeListener; 64 | } 65 | 66 | public interface OnSoftKeyBoardChangeListener { 67 | void keyBoardShow(int height); 68 | 69 | void keyBoardHide(int height); 70 | } 71 | 72 | public static void setListener(Activity activity, OnSoftKeyBoardChangeListener onSoftKeyBoardChangeListener) { 73 | SoftKeyBoardListener softKeyBoardListener = new SoftKeyBoardListener(activity); 74 | softKeyBoardListener.setOnSoftKeyBoardChangeListener(onSoftKeyBoardChangeListener); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /app/src/main/java/zzw/imtest/util/ViewUtil.java: -------------------------------------------------------------------------------- 1 | package zzw.imtest.util; 2 | 3 | import android.content.Context; 4 | 5 | import java.util.Locale; 6 | 7 | public class ViewUtil { 8 | public static int Dp2px(Context context, float dp) { 9 | final float scale = context.getResources().getDisplayMetrics().density; 10 | return (int) (dp * scale + 0.5f); 11 | } 12 | 13 | public static String formatFloat(float value) { 14 | return String.format(Locale.getDefault(), "%.3f", value); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/java/zzw/imtest/view/AddPop.java: -------------------------------------------------------------------------------- 1 | package zzw.imtest.view; 2 | 3 | import android.content.Context; 4 | import android.graphics.drawable.ColorDrawable; 5 | import android.view.LayoutInflater; 6 | import android.view.View; 7 | import android.view.ViewGroup; 8 | import android.widget.LinearLayout; 9 | import android.widget.PopupWindow; 10 | 11 | import zzw.imtest.R; 12 | 13 | 14 | public class AddPop { 15 | 16 | 17 | 18 | public PopupWindow pop; 19 | 20 | public LinearLayout ll_add,ll_gourp_chat,ll_scanner; 21 | 22 | 23 | public AddPop(Context context){ 24 | 25 | View view = LayoutInflater.from(context).inflate(R.layout.layout_pop_dialog_add,null,false); 26 | pop= new PopupWindow(view, ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT); 27 | pop.setBackgroundDrawable(new ColorDrawable()); 28 | pop.setOutsideTouchable(true); 29 | pop.getContentView().measure(0,0); 30 | pop.setFocusable(true); 31 | 32 | ll_add=(LinearLayout)view.findViewById(R.id.ll_add); 33 | ll_gourp_chat=(LinearLayout)view.findViewById(R.id.ll_gourp_chat); 34 | ll_scanner=(LinearLayout)view.findViewById(R.id.ll_scanner); 35 | 36 | } 37 | public void show(View v_target){ 38 | if(pop!=null){ 39 | pop.showAsDropDown(v_target,-((pop.getContentView().getMeasuredWidth()-v_target.getWidth())),0); 40 | } 41 | } 42 | 43 | 44 | public void dismiss(){ 45 | if(pop!=null){ 46 | pop.dismiss(); 47 | } 48 | } 49 | 50 | 51 | 52 | } 53 | -------------------------------------------------------------------------------- /app/src/main/java/zzw/imtest/view/SearchLayout.java: -------------------------------------------------------------------------------- 1 | package zzw.imtest.view; 2 | 3 | import android.content.Context; 4 | import android.content.res.TypedArray; 5 | import android.util.AttributeSet; 6 | import android.view.LayoutInflater; 7 | import android.view.View; 8 | import android.widget.EditText; 9 | import android.widget.RelativeLayout; 10 | import android.widget.TextView; 11 | 12 | import zzw.imtest.R; 13 | 14 | 15 | public class SearchLayout extends RelativeLayout { 16 | 17 | 18 | TextView tv; 19 | public EditText et; 20 | 21 | 22 | public SearchLayout(Context context) { 23 | super(context); 24 | } 25 | 26 | public SearchLayout(Context context, AttributeSet attrs) { 27 | super(context, attrs); 28 | 29 | LayoutInflater.from(context).inflate(R.layout.layout_search, this); 30 | 31 | tv=(TextView)findViewById(R.id.tv); 32 | et=(EditText)findViewById(R.id.et); 33 | 34 | TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.SearchLayout); 35 | String hint = typedArray.getString(R.styleable.SearchLayout_SearchLayout_hint); 36 | boolean isInput = typedArray.getBoolean(R.styleable.SearchLayout_SearchLayout_isInput,false); 37 | typedArray.recycle();//释放资源 38 | 39 | 40 | if(isInput){ 41 | et.setVisibility(View.VISIBLE); 42 | tv.setVisibility(View.INVISIBLE); 43 | et.setHint(hint); 44 | }else{ 45 | tv.setText(hint); 46 | 47 | 48 | } 49 | 50 | } 51 | 52 | 53 | 54 | } -------------------------------------------------------------------------------- /app/src/main/java/zzw/imtest/view/SelectLayout.java: -------------------------------------------------------------------------------- 1 | package zzw.imtest.view; 2 | 3 | import android.content.Context; 4 | import android.content.res.TypedArray; 5 | import android.util.AttributeSet; 6 | import android.view.LayoutInflater; 7 | import android.widget.ImageView; 8 | import android.widget.RelativeLayout; 9 | import android.widget.TextView; 10 | 11 | import zzw.imtest.R; 12 | 13 | 14 | public class SelectLayout extends RelativeLayout { 15 | 16 | 17 | public TextView tv_title,tv_content,tv_right; 18 | ImageView iv_back; 19 | 20 | 21 | public SelectLayout(Context context) { 22 | super(context); 23 | } 24 | 25 | public SelectLayout(Context context, AttributeSet attrs) { 26 | super(context, attrs); 27 | 28 | LayoutInflater.from(context).inflate(R.layout.layout_select, this); 29 | 30 | tv_title=(TextView)findViewById(R.id.tv_title); 31 | iv_back=(ImageView) findViewById(R.id.iv_back); 32 | 33 | TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.SelectLayout); 34 | String title = typedArray.getString(R.styleable.SelectLayout_SelectLayout_title); 35 | typedArray.recycle();//释放资源 36 | 37 | 38 | tv_title.setText(title); 39 | 40 | 41 | } 42 | 43 | 44 | 45 | } -------------------------------------------------------------------------------- /app/src/main/java/zzw/imtest/view/TitleLayout.java: -------------------------------------------------------------------------------- 1 | package zzw.imtest.view; 2 | 3 | import android.app.Activity; 4 | import android.content.Context; 5 | import android.content.res.TypedArray; 6 | import android.util.AttributeSet; 7 | import android.view.LayoutInflater; 8 | import android.view.View; 9 | import android.widget.ImageView; 10 | import android.widget.RelativeLayout; 11 | import android.widget.TextView; 12 | 13 | import zzw.imtest.R; 14 | 15 | 16 | public class TitleLayout extends RelativeLayout { 17 | 18 | 19 | public TextView tv; 20 | ImageView iv_back; 21 | 22 | 23 | public TitleLayout(Context context) { 24 | super(context); 25 | } 26 | 27 | public TitleLayout(Context context, AttributeSet attrs) { 28 | super(context, attrs); 29 | 30 | LayoutInflater.from(context).inflate(R.layout.layout_title, this); 31 | 32 | tv=(TextView)findViewById(R.id.tv); 33 | iv_back=(ImageView)findViewById(R.id.iv_back); 34 | 35 | TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.TitleLayout); 36 | String hint = typedArray.getString(R.styleable.TitleLayout_TitleLayout_title); 37 | typedArray.recycle();//释放资源 38 | 39 | 40 | tv.setText(hint); 41 | 42 | iv_back.setOnClickListener(new OnClickListener() { 43 | @Override 44 | public void onClick(View v) { 45 | if(getContext() instanceof Activity &&getContext()!=null){ 46 | ((Activity)getContext()).finish(); 47 | } 48 | } 49 | }); 50 | 51 | } 52 | 53 | 54 | 55 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 12 | 13 | 19 | 22 | 25 | 26 | 27 | 28 | 34 | 35 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/jmui_receive_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/drawable-xhdpi/jmui_receive_3.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/receive_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/drawable-xhdpi/receive_1.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/receive_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/drawable-xhdpi/receive_2.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/send_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/drawable-xhdpi/send_1.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/send_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/drawable-xhdpi/send_2.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/send_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/drawable-xhdpi/send_3.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/default_project_img.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/drawable-xxxhdpi/default_project_img.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_account.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/drawable-xxxhdpi/ic_account.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/drawable-xxxhdpi/ic_add.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/drawable-xxxhdpi/ic_back.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_clear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/drawable-xxxhdpi/ic_clear.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/drawable-xxxhdpi/ic_close.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_collect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/drawable-xxxhdpi/ic_collect.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_collected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/drawable-xxxhdpi/ic_collected.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/drawable-xxxhdpi/ic_delete.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_done.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/drawable-xxxhdpi/ic_done.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_favorite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/drawable-xxxhdpi/ic_favorite.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_history.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/drawable-xxxhdpi/ic_history.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_more.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/drawable-xxxhdpi/ic_more.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_password_see.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/drawable-xxxhdpi/ic_password_see.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_password_see_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/drawable-xxxhdpi/ic_password_see_on.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/drawable-xxxhdpi/ic_right.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/drawable-xxxhdpi/ic_search.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_tag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/drawable-xxxhdpi/ic_tag.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_wandroid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/drawable-xxxhdpi/ic_wandroid.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_yiguoqi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/drawable-xxxhdpi/ic_yiguoqi.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/load_empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/drawable-xxxhdpi/load_empty.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/load_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/drawable-xxxhdpi/load_error.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/menu_main.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/drawable-xxxhdpi/menu_main.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/menu_me.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/drawable-xxxhdpi/menu_me.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/menu_project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/drawable-xxxhdpi/menu_project.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/menu_public.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/drawable-xxxhdpi/menu_public.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/menu_tree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/drawable-xxxhdpi/menu_tree.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/scanner_flashlight_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/drawable-xxxhdpi/scanner_flashlight_normal.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/scanner_flashlight_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/drawable-xxxhdpi/scanner_flashlight_pressed.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/wx_scan_line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/drawable-xxxhdpi/wx_scan_line.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/address_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_shap.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/buy_btn_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/chat_detail_add.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/chat_item_receive.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/chat_item_send.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/chat_receive_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/chat_send_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/confirm_turn_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/edit_shap.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/et_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/et_cursor.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/flow_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/forground_shap.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/header_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/item_imgselector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/item_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/keyvisibily_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/main_dialog_top.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/notice_spot.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/recharge_code_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/redp_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/redp_v_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/round_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/scanner_flashlight.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/search_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/switch_in_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/title_lable_shap.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/title_lable_shap1.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/user_detail_top.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/voice_receive_play.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 10 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/voice_send_play.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 10 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_add_friend.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 15 | 16 | 22 | 23 | 24 | 30 | 31 | 32 | 38 | 39 | 48 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_chat_detail.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 16 | 17 | 21 | 22 | 23 | 24 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 46 | 47 | 48 | 49 | 56 | 57 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_code.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 14 | 15 | 24 | 25 | 34 | 35 | 41 | 51 | 52 | 53 | 54 | 55 | 56 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_group.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 16 | 17 | 18 | 19 | 23 | 24 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_new_friend.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 16 | 17 | 18 | 19 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_new_group_chat.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 16 | 17 | 18 | 19 | 24 | 25 | 26 | 40 | 41 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_person_inform.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 16 | 17 | 18 | 23 | 24 | 33 | 34 | 42 | 43 | 51 | 52 | 53 | 54 | 55 | 60 | 61 | 62 | 63 | 69 | 70 | 75 | 76 | 82 | 83 | 88 | 89 | 90 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_preview.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 16 | 17 | 18 | 22 | 23 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_scanner.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | 13 | 17 | 18 | 19 | 24 | 25 | 32 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 56 | 57 | 67 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_chat.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 14 | 15 | 16 | 24 | 25 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 44 | 45 | 46 | 47 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_chat_option.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_mail_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 14 | 15 | 16 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 36 | 37 | 43 | 52 | 53 | 60 | 61 | 62 | 63 | 64 | 65 | 69 | 75 | 76 | 82 | 91 | 92 | 93 | 94 | 98 | 102 | 103 | 104 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /app/src/main/res/layout/include_toolbar.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_chat_address_receive.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 12 | 16 | 17 | 24 | 25 | 26 | 27 | 34 | 35 | 36 | 48 | 49 | 61 | 62 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 84 | 85 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_chat_address_send.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 15 | 16 | 24 | 25 | 26 | 27 | 35 | 36 | 37 | 49 | 50 | 62 | 63 | 69 | 70 | 71 | 72 | 73 | 74 | 83 | 84 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_chat_card_receive.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 15 | 16 | 23 | 24 | 25 | 26 | 33 | 34 | 42 | 52 | 53 | 59 | 60 | 71 | 72 | 73 | 74 | 75 | 85 | 86 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_chat_card_send.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 15 | 16 | 24 | 25 | 26 | 27 | 35 | 36 | 37 | 45 | 55 | 56 | 62 | 63 | 74 | 75 | 76 | 77 | 78 | 87 | 88 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_chat_detail.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 18 | 19 | 20 | 32 | 33 | 34 | 42 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_chat_file_receive.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 15 | 16 | 23 | 24 | 37 | 42 | 43 | 44 | 55 | 56 | 63 | 64 | 65 | 76 | 77 | 78 | 79 | 89 | 90 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_chat_file_send.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 15 | 16 | 24 | 25 | 26 | 40 | 45 | 46 | 47 | 58 | 59 | 60 | 61 | 62 | 73 | 74 | 81 | 82 | 83 | 84 | 94 | 95 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_chat_img_receive.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 15 | 16 | 23 | 24 | 25 | 26 | 34 | 35 | 45 | 46 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_chat_img_send.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 15 | 16 | 24 | 25 | 34 | 44 | 45 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_chat_option.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_chat_redp_receive.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 15 | 16 | 23 | 24 | 25 | 26 | 27 | 28 | 35 | 40 | 41 | 47 | 48 | 59 | 60 | 70 | 71 | 72 | 73 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_chat_redp_send.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 15 | 16 | 24 | 25 | 26 | 27 | 35 | 36 | 41 | 42 | 48 | 49 | 60 | 61 | 71 | 72 | 73 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_chat_retract.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_chat_text_receive.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 15 | 16 | 23 | 24 | 39 | 40 | 41 | 51 | 52 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_chat_text_send.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 12 | 16 | 17 | 25 | 26 | 42 | 43 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_chat_voice_receive.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 14 | 21 | 22 | 36 | 46 | 47 | 54 | 55 | 56 | 57 | 67 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_chat_voice_send.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 12 | 16 | 17 | 18 | 26 | 27 | 28 | 43 | 53 | 54 | 61 | 62 | 63 | 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_group.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 12 | 13 | 21 | 22 | 33 | 34 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_mail_list_content.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 16 | 26 | 33 | 34 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_main_dialog.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 17 | 18 | 28 | 29 | 39 | 46 | 47 | 53 | 54 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_new_friend.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 12 | 20 | 21 | 22 | 32 | 33 | 43 | 44 | 55 | 56 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_new_group_content.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 12 | 19 | 20 | 28 | 29 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /app/src/main/res/layout/layout_info.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 18 | 19 | 30 | 31 | 32 | 40 | 41 | 50 | 51 | -------------------------------------------------------------------------------- /app/src/main/res/layout/layout_search.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 16 | 17 | 23 | 24 | 34 | 35 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /app/src/main/res/layout/layout_select.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 21 | 22 | 23 | 24 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /app/src/main/res/layout/layout_title.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 18 | 19 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /app/src/main/res/layout/video_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxhdpi/add.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/add_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxhdpi/add_blue.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/add_dialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxhdpi/add_dialog.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/add_friend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxhdpi/add_friend.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/add_friend_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxhdpi/add_friend_white.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/add_group_chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxhdpi/add_group_chat.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/address_map_bg.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxhdpi/address_map_bg.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxhdpi/back.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/back_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxhdpi/back_icon.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/chat_option_address.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxhdpi/chat_option_address.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/chat_option_file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxhdpi/chat_option_file.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/chat_option_person.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxhdpi/chat_option_person.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/chat_option_photo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxhdpi/chat_option_photo.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/chat_option_redpacket.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxhdpi/chat_option_redpacket.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxhdpi/code.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/dialog_select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxhdpi/dialog_select.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/dialog_unselect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxhdpi/dialog_unselect.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/handfs_free.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxhdpi/handfs_free.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/head_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxhdpi/head_default.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/icon_softkeyboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxhdpi/icon_softkeyboard.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/jmui_document.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxhdpi/jmui_document.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/jmui_mic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxhdpi/jmui_mic.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/mail_list_select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxhdpi/mail_list_select.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/mail_list_unselect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxhdpi/mail_list_unselect.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/message.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxhdpi/message.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/mian_dialog_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxhdpi/mian_dialog_add.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/my_collection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxhdpi/my_collection.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/my_scanner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxhdpi/my_scanner.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/my_select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxhdpi/my_select.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/my_setting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxhdpi/my_setting.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/my_unselect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxhdpi/my_unselect.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/my_wallet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxhdpi/my_wallet.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/phone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxhdpi/phone.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/pop_group_chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxhdpi/pop_group_chat.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/redp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxhdpi/redp.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/scanner_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxhdpi/scanner_icon.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/scanner_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxhdpi/scanner_white.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxhdpi/search.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxhdpi/select.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/smile_face.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxhdpi/smile_face.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/sound_record.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxhdpi/sound_record.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/stop_handfs_free.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxhdpi/stop_handfs_free.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/unselect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxhdpi/unselect.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/video_phone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxhdpi/video_phone.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/video_phone_receive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxhdpi/video_phone_receive.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #2196F3 4 | #2196F3 5 | #2196F3 6 | 7 | #ff000000 8 | 9 | #999999 10 | #FFFFFF 11 | #333 12 | #666 13 | #333 14 | #F5F5F5 15 | #d8d8d8 16 | #eeeeee 17 | #CCCCCC 18 | #a0a0a0 19 | #cecece 20 | #E91E63 21 | 22 | 23 | #ff3f9bcf 24 | #FF000000 25 | 26 | #FFEDEDED 27 | #ff9b9b9b 28 | 29 | #FFC2C0C0 30 | 31 | #ff4fabe0 32 | #FFEEA055 33 | 34 | 35 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 48dp 5 | 270dp 6 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 玩聊天 3 | 4 | 5 | yyyy年-MM月-dd日 6 | yyyy-MM-dd HH:mm:ss 7 | HH:mm 8 | 昨天 9 | 前天 10 | 凌晨 11 | 早上 12 | 下午 13 | 晚上 14 | 周一 15 | 周二 16 | 周三 17 | 周四 18 | 周五 19 | 周六 20 | 周日 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | 21 | 22 | 23 | 32 | 33 | 34 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /app/src/test/java/zzw/imtest/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package zzw.imtest 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 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | ext.kotlin_version = '1.3.41' 5 | repositories { 6 | google() 7 | jcenter() 8 | 9 | } 10 | dependencies { 11 | classpath 'com.android.tools.build:gradle:3.5.0' 12 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 13 | // NOTE: Do not place your application dependencies here; they belong 14 | // in the individual module build.gradle files 15 | } 16 | } 17 | 18 | allprojects { 19 | repositories { 20 | google() 21 | jcenter() 22 | maven { url "https://jitpack.io" } 23 | } 24 | } 25 | 26 | task clean(type: Delete) { 27 | delete rootProject.buildDir 28 | } 29 | -------------------------------------------------------------------------------- /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 | # AndroidX package structure to make it clearer which packages are bundled with the 15 | # Android operating system, and which are packaged with your app's APK 16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 17 | android.useAndroidX=true 18 | # Automatically convert third-party libraries to use AndroidX 19 | android.enableJetifier=true 20 | # Kotlin code style for this project: "official" or "obsolete": 21 | kotlin.code.style=official 22 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Sep 11 09:07:18 CST 2019 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-5.4.1-all.zip 7 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | set DIRNAME=%~dp0 12 | if "%DIRNAME%" == "" set DIRNAME=. 13 | set APP_BASE_NAME=%~n0 14 | set APP_HOME=%DIRNAME% 15 | 16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 17 | set DEFAULT_JVM_OPTS= 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windows variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | 53 | :win9xME_args 54 | @rem Slurp the command line arguments. 55 | set CMD_LINE_ARGS= 56 | set _SKIP=2 57 | 58 | :win9xME_args_slurp 59 | if "x%~1" == "x" goto execute 60 | 61 | set CMD_LINE_ARGS=%* 62 | 63 | :execute 64 | @rem Setup the command line 65 | 66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 67 | 68 | @rem Execute Gradle 69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 70 | 71 | :end 72 | @rem End local scope for the variables with windows NT shell 73 | if "%ERRORLEVEL%"=="0" goto mainEnd 74 | 75 | :fail 76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 77 | rem the _cmd.exe /c_ return code! 78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 79 | exit /b 1 80 | 81 | :mainEnd 82 | if "%OS%"=="Windows_NT" endlocal 83 | 84 | :omega 85 | -------------------------------------------------------------------------------- /img/微信图片_20190917100534.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/img/微信图片_20190917100534.jpg -------------------------------------------------------------------------------- /img/微信图片_20190917100553.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/img/微信图片_20190917100553.jpg -------------------------------------------------------------------------------- /img/微信图片_20190917100557.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/img/微信图片_20190917100557.jpg -------------------------------------------------------------------------------- /img/微信图片_20190917100601.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/img/微信图片_20190917100601.jpg -------------------------------------------------------------------------------- /img/微信图片_20190917100605.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/img/微信图片_20190917100605.jpg -------------------------------------------------------------------------------- /img/微信图片_20190917100611.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/img/微信图片_20190917100611.jpg -------------------------------------------------------------------------------- /img/微信图片_20190917100615.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/img/微信图片_20190917100615.jpg -------------------------------------------------------------------------------- /img/微信图片_20190917100618.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/img/微信图片_20190917100618.jpg -------------------------------------------------------------------------------- /img/微信图片_20190917100625.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/img/微信图片_20190917100625.jpg -------------------------------------------------------------------------------- /img/微信图片_20190917100628.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/WanIm/3b16d63f6da5b5a24c60ba5eaed7357a0ed0372f/img/微信图片_20190917100628.jpg -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | rootProject.name='JgIm' 3 | --------------------------------------------------------------------------------