Skip to content

Commit

Permalink
2.2.0,适配 Android SDK v2.3.0,支持多端同时在线,群组头像,会话置顶,消息已读未读,消息转发,新增名片功能,支持扫…
Browse files Browse the repository at this point in the history
…描名片二维码,支持聊天记录文件
  • Loading branch information
chenyanan committed Oct 25, 2017
2 parents 9f0701f + 1cfab87 commit cca7ae2
Show file tree
Hide file tree
Showing 220 changed files with 13,113 additions and 1,015 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ proguard/

# Log Files
*.log
/chatapp/libs/jcore-android-1.1.6-debug-b152.jar
/chatapp/libs/jmessage-android_debug_v2.3.0_b791.jar
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ JChat 同时具备好友模式和无好友模式:
* 无好友模式:无需将对方加为好友,通过搜索对方的用户名可直接发起聊天。
* 好友模式:可申请将对方加为好友,对方会收到好友验证,验证通过则互为好友关系。

目前已覆盖 Android [iOS](https://github.com/jpush/jchat-swift) 平台,之后将提供 web 版本,开发者可参照 JChat 快速打造自己的 APP,提高开发效率。
目前已覆盖 Android [iOS](https://github.com/jpush/jchat-swift) [Web](https://github.com/jpush/jchat-web)[Windows](https://github.com/jpush/jchat-windows)平台,开发者可参照 JChat 快速打造自己的 APP,提高开发效率。

* 更换 AppKey
- 在 AndroidManifest.xml 文件中把 JChat 的 AppKey 替换成自己项目的 AppKey
Expand Down
2 changes: 2 additions & 0 deletions chatapp/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ build/
gen/
.settings/
*.keystore
/libs/jcore-android-1.1.6-debug-b152.jar
/libs/jmessage-android_debug_v2.3.0_b791.jar
12 changes: 4 additions & 8 deletions chatapp/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion "25.0.1"
Expand All @@ -9,10 +8,9 @@ android {
minSdkVersion 18
targetSdkVersion 23
versionCode 61
versionName "2.1.1"

versionName "2.2.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

}
buildTypes {
release {
Expand Down Expand Up @@ -51,6 +49,7 @@ dependencies {
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:multidex:1.0.1'
compile 'com.michaelpardo:activeandroid:3.1.0-SNAPSHOT'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:recyclerview-v7:23.1.0'
Expand All @@ -60,13 +59,10 @@ dependencies {
compile 'com.github.bumptech.glide:glide:3.6.1'
compile 'com.github.w446108264:AndroidEmoji:1.0.0'
compile 'com.github.chrisbanes.photoview:library:1.2.4'
compile files('libs/universal-image-loader-1.9.5.jar')
compile files('libs/BaiduLBS_Android.jar')
compile 'com.facebook.fresco:fresco:0.8.1'
compile files('libs/pinyin4j-2.5.0.jar')
compile 'org.greenrobot:eventbus:3.0.0'
compile 'io.reactivex:rxandroid:1.2.1'
compile project(':reclib-qq')
compile project(':reclib-testemoticons')
compile files('libs/picasso-2.5.2.jar')
compile 'com.contrarywind:Android-PickerView:3.2.4'
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added chatapp/libs/core-3.2.1.jar
Binary file not shown.
Binary file added chatapp/libs/gson-2.2.1.jar
Binary file not shown.
Binary file added chatapp/libs/jcore-android-1.1.7.jar
Binary file not shown.
Binary file removed chatapp/libs/jcore-android_v1.1.3.jar
Binary file not shown.
Binary file removed chatapp/libs/jmessage-android_v2.2.0.jar
Binary file not shown.
Binary file added chatapp/libs/jmessage-android_v2.3.0.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
122 changes: 108 additions & 14 deletions chatapp/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
android:theme="@style/Theme.AppCompat.NoActionBar">

<meta-data
android:name="AA_DB_NAME" android:value="jchat.db"/>
android:name="AA_DB_NAME"
android:value="jchat.db"/>
<meta-data
android:name="AA_MODELS"
android:value="jiguang.chat.database.UserEntry, jiguang.chat.database.FriendEntry,
Expand Down Expand Up @@ -122,6 +123,11 @@
android:name="JPUSH_APPKEY"
android:value="4f7aef34fb361292c566a1cd"/>

<provider
android:name="cn.jpush.android.service.DataProvider"
android:authorities="${applicationId}.DataProvider"
android:exported="true" />

<activity
android:name=".activity.WelcomeActivity"
android:screenOrientation="portrait"
Expand All @@ -132,8 +138,10 @@
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:name=".activity.LoginActivity"
android:screenOrientation="portrait"/>
<activity
android:name=".activity.LoginActivity"
android:screenOrientation="portrait"
/>
<activity
android:name=".activity.MainActivity"
android:screenOrientation="portrait"
Expand All @@ -146,146 +154,232 @@
android:windowSoftInputMode="stateVisible"
android:theme="@style/BaseThemes"/>
<activity
android:screenOrientation="portrait"
android:name=".activity.ResetPasswordActivity"
android:theme="@style/BaseThemes">
</activity>
<activity
android:screenOrientation="portrait"
android:name=".activity.FeedbackActivity"
android:theme="@style/BaseThemes"/>
<activity
android:screenOrientation="portrait"
android:name=".activity.AboutJChatActivity"
android:theme="@style/BaseThemes"/>
<!--这里有个需要注意的地方就是,自定义的弹窗需要自定义一个theme否则系统会默认给设置padding自己设置的属性不生效-->
<activity
android:screenOrientation="portrait"
android:name=".activity.PersonalActivity"
android:theme="@style/AppBaseTheme"/>
android:theme="@style/BaseThemes"/>
<activity
android:screenOrientation="portrait"
android:name=".activity.NickSignActivity"
android:theme="@style/BaseThemes"/>
<activity
android:screenOrientation="portrait"
android:name=".activity.SearchForAddFriendActivity"
android:theme="@style/BaseThemes"/>
<activity
android:screenOrientation="portrait"
android:name=".activity.SearchFriendInfoActivity"
android:theme="@style/BaseThemes"/>
<activity
android:screenOrientation="portrait"
android:name=".activity.VerificationActivity"
android:theme="@style/BaseThemes"/>
<activity
android:screenOrientation="portrait"
android:name=".activity.FriendRecommendActivity"
android:theme="@style/BaseThemes"/>
<activity
android:screenOrientation="portrait"
android:name=".activity.SearchFriendDetailActivity"
android:theme="@style/BaseThemes"/>

<activity
android:screenOrientation="portrait"
android:name=".activity.ChatActivity"
android:theme="@style/BaseThemes"/>
<activity
android:screenOrientation="portrait"
android:name=".activity.SearchContactsActivity"
android:theme="@style/BaseThemes"
android:windowSoftInputMode="adjustResize"/>
<activity
android:screenOrientation="portrait"
android:name=".utils.imagepicker.ImageBaseActivity"
android:theme="@style/BaseThemes"/>
<activity
android:screenOrientation="portrait"
android:name=".utils.imagepicker.ImageGridActivity"
android:configChanges="orientation|screenSize"
android:theme="@style/ImagePickerTheme"/>
<activity
android:screenOrientation="portrait"
android:name=".utils.imagepicker.ImageCropActivity"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="false"
android:theme="@style/ImagePickerTheme"/>
<activity
android:screenOrientation="portrait"
android:name=".utils.imagepicker.ImagePreviewActivity"
android:configChanges="orientation|screenSize"
android:theme="@style/ImagePickerThemeFullScreen"/>
<activity
android:screenOrientation="portrait"
android:name=".utils.imagepicker.ImagePreviewDelActivity"
android:theme="@style/ImagePickerThemeFullScreen"/>
<activity
android:screenOrientation="portrait"
android:name=".pickerimage.PickerAlbumActivity"
android:theme="@style/BaseThemes"/>
<activity android:name=".pickerimage.PickerAlbumPreviewActivity"/>
<activity android:name=".pickerimage.PickImageActivity"/>
<activity android:name=".activity.BrowserViewPagerActivity"/>
<activity android:name=".activity.WatchVideoActivity"/>
<activity android:name=".pickerimage.PickerAlbumPreviewActivity"
android:screenOrientation="portrait"/>
<activity android:name=".pickerimage.PickImageActivity"
android:screenOrientation="portrait"/>
<activity android:name=".activity.BrowserViewPagerActivity"
android:screenOrientation="portrait"/>
<activity android:name=".activity.historyfile.activity.BrowserFileImageActivity"
android:screenOrientation="portrait"/>
<activity android:name=".activity.WatchVideoActivity"
android:screenOrientation="portrait"/>
<activity
android:screenOrientation="portrait"
android:name=".activity.SendFileActivity"
android:launchMode="singleInstance"
android:theme="@style/AppBaseTheme"/>
<activity android:name=".activity.PlayVideoActivity"/>
<activity
android:screenOrientation="portrait"
android:name=".activity.historyfile.activity.HistoryFileActivity"
android:theme="@style/AppBaseTheme"/>
<activity android:name=".activity.PlayVideoActivity"
android:screenOrientation="portrait"/>
<activity
android:screenOrientation="portrait"
android:name=".location.activity.MapPickerActivity"
android:theme="@style/Theme.AppCompat.Light.DarkActionBar"/>
<activity
android:screenOrientation="portrait"
android:name=".activity.FriendInfoActivity"
android:theme="@style/BaseThemes"/>
<activity
android:screenOrientation="portrait"
android:name=".activity.ChatDetailActivity"
android:theme="@style/BaseThemes"/>
<activity
android:screenOrientation="portrait"
android:name=".activity.MembersInChatActivity"
android:configChanges="orientation|keyboardHidden"
android:theme="@style/BaseThemes"
android:windowSoftInputMode="adjustPan|stateHidden"/>
<activity
android:screenOrientation="portrait"
android:name=".activity.GroupActivity"
android:theme="@style/BaseThemes"/>
<activity
android:screenOrientation="portrait"
android:name=".activity.SearchMoreFriendsActivity"
android:configChanges="orientation|keyboardHidden"
android:theme="@style/BaseThemes"
android:windowSoftInputMode="adjustPan|stateHidden"/>
<activity
android:screenOrientation="portrait"
android:name=".activity.SearchMoreGroupActivity"
android:configChanges="orientation|keyboardHidden"
android:theme="@style/AppBaseTheme"
android:windowSoftInputMode="adjustPan|stateHidden"/>
<activity
android:screenOrientation="portrait"
android:name=".activity.FriendSettingActivity"
android:theme="@style/BaseThemes"/>
<activity
android:screenOrientation="portrait"
android:name=".activity.SetNoteNameActivity"
android:theme="@style/BaseThemes"/>
<activity
android:screenOrientation="portrait"
android:name=".activity.ChooseAtMemberActivity"
android:theme="@style/BaseThemes"/>
<activity
android:screenOrientation="portrait"
android:name=".activity.GroupGridViewActivity"
android:theme="@style/BaseThemes"/>
<activity
android:screenOrientation="portrait"
android:name=".activity.GroupNotFriendActivity"
android:theme="@style/BaseThemes"/>
<activity
android:screenOrientation="portrait"
android:name=".activity.SelectFriendActivity"
android:theme="@style/BaseThemes"/>
<activity
android:screenOrientation="portrait"
android:name=".activity.DownLoadActivity"
android:theme="@style/BaseThemes"/>
<activity
android:screenOrientation="portrait"
android:name=".activity.CreateGroupActivity"
android:configChanges="orientation|keyboardHidden"
android:theme="@style/BaseThemes"
android:windowSoftInputMode="adjustPan|stateHidden"/>
<activity android:name=".utils.photovideo.takevideo.CameraActivity"
android:configChanges="orientation|keyboardHidden"
android:screenOrientation="portrait"
android:theme="@style/AppBaseFullTheme"
android:launchMode="singleTask"/>
<activity
android:name=".utils.photovideo.takevideo.CameraActivity"
android:configChanges="orientation|keyboardHidden"
android:launchMode="singleTask"
android:screenOrientation="portrait"
android:theme="@style/AppBaseFullTheme"/>
<activity
android:screenOrientation="portrait"
android:name=".activity.SearchGroupActivity"
android:theme="@style/BaseThemes"
android:windowSoftInputMode="adjustResize"/>
<activity
android:screenOrientation="portrait"
android:name=".activity.SearchAtMemberActivity"
android:theme="@style/BaseThemes"
android:windowSoftInputMode="adjustResize"/>
<activity
android:screenOrientation="portrait"
android:name=".activity.ForwardMsgActivity"
android:theme="@style/BaseThemes"
android:windowSoftInputMode="adjustResize"/>
<activity
android:screenOrientation="portrait"
android:name=".activity.Person2CodeActivity"
android:theme="@style/BaseThemes"
android:windowSoftInputMode="adjustResize"/>
<activity
android:screenOrientation="portrait"
android:name=".activity.ScanResultActivity"
android:theme="@style/BaseThemes"
android:windowSoftInputMode="adjustResize"/>
<activity
android:screenOrientation="portrait"
android:name=".activity.CommonScanActivity"
android:theme="@style/Theme.AppCompat.Light.DarkActionBar"
android:windowSoftInputMode="adjustResize"/>
<activity
android:screenOrientation="portrait"
android:name=".activity.receiptmessage.ReceiptMessageListActivity"
android:theme="@style/BaseThemes"
android:windowSoftInputMode="adjustResize"/>
<activity
android:screenOrientation="portrait"
android:name=".activity.SearchFriendBusinessActivity"
android:theme="@style/BaseThemes"
android:windowSoftInputMode="adjustResize"/>
<activity
android:screenOrientation="portrait"
android:name=".activity.FriendListActivity"
android:theme="@style/BaseThemes"/>
<activity
android:screenOrientation="portrait"
android:name=".activity.NotFriendSettingActivity"
android:theme="@style/BaseThemes"/>
<activity
android:screenOrientation="portrait"
android:name=".activity.GroupAvatarActivity"
android:theme="@style/AppTh"/>
</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public void onClick(View v) {
PackageManager manager = getPackageManager();
try {
PackageInfo packageInfo = manager.getPackageInfo(getPackageName(), 0);
mJChat_version.setText("JChat v" + packageInfo.versionName);
mJChat_version.setText(packageInfo.versionName);
} catch (PackageManager.NameNotFoundException e) {
e.printStackTrace();
}
Expand Down
4 changes: 4 additions & 0 deletions chatapp/src/main/java/jiguang/chat/activity/BaseActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ public void gotResult(int responseCode, String responseMessage) {
dialog.setCanceledOnTouchOutside(false);
dialog.show();
break;
case user_password_change:
Intent intent = new Intent(BaseActivity.this, LoginActivity.class);
startActivity(intent);
break;
}
}
@Override
Expand Down
Loading

0 comments on commit cca7ae2

Please sign in to comment.