Merge branch 'V1.2.0' into develop_new
This commit is contained in:
@@ -86,8 +86,20 @@ andResGuard {
|
||||
"R.drawable.umcsdk_*",
|
||||
"R.drawable.loading",
|
||||
"R.string.umcsdk_*",
|
||||
|
||||
|
||||
//华为推送
|
||||
"R.string.hms*",
|
||||
"R.string.connect_server_fail_prompt_toast",
|
||||
"R.string.getting_message_fail_prompt_toast",
|
||||
"R.string.no_available_network_prompt_toast",
|
||||
"R.string.third_app_*",
|
||||
"R.string.upsdk_*",
|
||||
"R.layout.hms*",
|
||||
"R.layout.upsdk_*",
|
||||
"R.drawable.upsdk*",
|
||||
"R.color.upsdk*",
|
||||
"R.dimen.upsdk*",
|
||||
"R.style.upsdk*",
|
||||
"R.string.agc*"
|
||||
]
|
||||
compressFilePattern = [
|
||||
"*.png",
|
||||
|
@@ -5,6 +5,7 @@ apply from: 'and_res_guard.gradle'
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'kotlin-android-extensions'
|
||||
apply plugin: 'com.huawei.agconnect'
|
||||
|
||||
android {
|
||||
compileSdkVersion 29
|
||||
@@ -251,8 +252,8 @@ dependencies {
|
||||
implementation 'nl.dionsegijn:konfetti:1.1.2'
|
||||
|
||||
// 华为推送
|
||||
api(name: 'base-2.6.0.301', ext: 'aar')
|
||||
api(name: 'push-2.6.0.301', ext: 'aar')
|
||||
// api(name: 'base-2.6.1.301', ext: 'aar')
|
||||
// api(name: 'push-2.6.1.301', ext: 'aar')
|
||||
// 魅族推送
|
||||
implementation 'com.meizu.flyme.internet:push-internal:3.6.3@aar'
|
||||
// vivo推送
|
||||
@@ -293,12 +294,12 @@ dependencies {
|
||||
implementation "androidx.core:core-ktx:+"
|
||||
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
|
||||
implementation 'com.huawei.hms:push:4.0.4.301'
|
||||
}
|
||||
|
||||
repositories {
|
||||
flatDir {
|
||||
dirs 'aliyun-libs', 'hw-push-libs', 'quick-pass-libs'
|
||||
dirs 'aliyun-libs', 'quick-pass-libs'
|
||||
}
|
||||
mavenCentral()
|
||||
}
|
||||
|
Binary file not shown.
BIN
app/hw-push-libs/base-2.6.1.301.aar
Normal file
BIN
app/hw-push-libs/base-2.6.1.301.aar
Normal file
Binary file not shown.
Binary file not shown.
BIN
app/hw-push-libs/push-2.6.1.301.aar
Normal file
BIN
app/hw-push-libs/push-2.6.1.301.aar
Normal file
Binary file not shown.
8
app/proguard-rules.pro
vendored
8
app/proguard-rules.pro
vendored
@@ -145,7 +145,15 @@
|
||||
-ignorewarnings
|
||||
-keepattributes *Annotation*
|
||||
-keepattributes Exceptions
|
||||
-keepattributes InnerClasses
|
||||
-keepattributes Signature
|
||||
-keepattributes SourceFile,LineNumberTable
|
||||
-keep class com.hianalytics.android.**{*;}
|
||||
-keep class com.huawei.updatesdk.**{*;}
|
||||
-keep class com.huawei.hms.**{*;}
|
||||
-keep class com.huawei.agconnect.**{*;}
|
||||
|
||||
|
||||
# hmscore-support: remote transport
|
||||
-keep class * extends com.huawei.hms.core.aidl.IMessageEntity { *; }
|
||||
# hmscore-support: remote transport
|
||||
|
@@ -235,42 +235,14 @@
|
||||
</intent-filter>
|
||||
</receiver> <!-- 云信集成小米推送 end -->
|
||||
<!-- 云信集成华为推送 start -->
|
||||
<provider
|
||||
android:name="com.huawei.hms.update.provider.UpdateProvider"
|
||||
android:authorities="${applicationId}.hms.update.provider"
|
||||
android:exported="false"
|
||||
android:grantUriPermissions="true" /> <!-- 云信华为推送消息广播 -->
|
||||
<receiver android:name="com.netease.nimlib.mixpush.hw.HWPushReceiver">
|
||||
<intent-filter android:priority="0x7fffffff">
|
||||
<action android:name="com.huawei.android.push.intent.REGISTRATION" />
|
||||
<action android:name="com.huawei.android.push.intent.RECEIVE" />
|
||||
<action android:name="com.huawei.android.push.intent.CLICK" />
|
||||
<action android:name="com.huawei.intent.action.PUSH_STATE" />
|
||||
</intent-filter>
|
||||
|
||||
<meta-data
|
||||
android:name="CS_cloud_ablitity"
|
||||
android:value="successRateAnalytics" />
|
||||
</receiver> <!-- 兼容性广播 -->
|
||||
<receiver android:name="com.huawei.hms.support.api.push.PushEventReceiver">
|
||||
<service
|
||||
android:name="com.netease.nimlib.mixpush.hw.HWPushService"
|
||||
android:exported="false">
|
||||
<intent-filter>
|
||||
|
||||
<!-- 接收通道发来的通知栏消息,兼容老版本Push -->
|
||||
<action android:name="com.huawei.intent.action.PUSH" />
|
||||
<action android:name="com.huawei.push.action.MESSAGING_EVENT" />
|
||||
</intent-filter>
|
||||
</receiver> <!-- 填入华为推送平台配置的应用appid -->
|
||||
<meta-data
|
||||
android:name="com.huawei.hms.client.appid"
|
||||
android:value="100435303" />
|
||||
|
||||
<receiver android:name=".push.HwPushMessageReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="com.huawei.android.push.intent.REGISTRATION" />
|
||||
<action android:name="com.huawei.android.push.intent.RECEIVE" />
|
||||
<action android:name="com.huawei.android.push.intent.CLICK" />
|
||||
<action android:name="com.huawei.intent.action.PUSH_STATE" />
|
||||
</intent-filter>
|
||||
</receiver> <!-- 云信集成华为推送 end -->
|
||||
</service>
|
||||
<!-- 云信集成华为推送 end -->
|
||||
<!-- 云信集成魅族推送 start -->
|
||||
<!-- 配置的service和receiver -->
|
||||
<receiver android:name="com.netease.nimlib.mixpush.mz.MZPushReceiver">
|
||||
@@ -389,12 +361,7 @@
|
||||
android:exported="true"
|
||||
android:targetActivity="com.yizhuan.xchat_android_core.pay.PaymentActivity" />
|
||||
<!-- 支付相关配置 -->
|
||||
<!-- bugly配置 begin ####################################################### -->
|
||||
<activity
|
||||
android:name="com.tencent.bugly.beta.ui.BetaActivity"
|
||||
android:configChanges="keyboardHidden|orientation|screenSize|locale"
|
||||
android:theme="@android:style/Theme.Translucent" />
|
||||
<!-- bugly配置 end ####################################################### -->
|
||||
|
||||
<!-- shareSDK配置 begin ####################################################### -->
|
||||
<meta-data
|
||||
android:name="Mob-AppKey"
|
||||
|
@@ -892,16 +892,13 @@ public abstract class BaseActivity extends RxAppCompatActivity
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 权限回调接口
|
||||
*/
|
||||
private PermissionActivity.CheckPermListener mListener;
|
||||
|
||||
private RxPermissions rxPermissions = new RxPermissions(this);
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
public void checkPermission(PermissionActivity.CheckPermListener listener, int resString, String... mPerms) {
|
||||
mListener = listener;
|
||||
/**
|
||||
* 权限回调接口
|
||||
*/
|
||||
rxPermissions.request(mPerms)
|
||||
.subscribe(aBoolean -> {
|
||||
if (aBoolean && listener != null) {
|
||||
|
@@ -867,17 +867,14 @@ public abstract class BaseMvpActivity<V extends IMvpBaseView, P extends Abstract
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 权限回调接口
|
||||
*/
|
||||
private PermissionActivity.CheckPermListener mListener;
|
||||
|
||||
private RxPermissions rxPermissions = new RxPermissions(this);
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
public void checkPermission(PermissionActivity.CheckPermListener listener,
|
||||
int resString, String... mPerms) {
|
||||
mListener = listener;
|
||||
/**
|
||||
* 权限回调接口
|
||||
*/
|
||||
rxPermissions.request(mPerms)
|
||||
.subscribe(aBoolean -> {
|
||||
if (aBoolean && listener != null) {
|
||||
|
@@ -70,12 +70,7 @@ public abstract class BaseMvpTakePhotoActivity<V extends IMvpBaseView, P extends
|
||||
checkPermission(checkPermissionListener, R.string.ask_camera, android.Manifest.permission.CAMERA);
|
||||
}
|
||||
|
||||
PermissionActivity.CheckPermListener checkPermissionListener = new PermissionActivity.CheckPermListener() {
|
||||
@Override
|
||||
public void superPermission() {
|
||||
takePhoto();
|
||||
}
|
||||
};
|
||||
PermissionActivity.CheckPermListener checkPermissionListener = () -> takePhoto();
|
||||
|
||||
private void takePhoto() {
|
||||
String mCameraCapturingName = CAMERA_PREFIX + System.currentTimeMillis() + ".jpg";
|
||||
|
@@ -79,8 +79,7 @@ public class PermissionActivity extends AppCompatActivity implements
|
||||
if (mListener != null)
|
||||
mListener.superPermission();
|
||||
} else {
|
||||
EasyPermissions.requestPermissions(this, getString(resString),
|
||||
RC_PERM, mPerms);
|
||||
EasyPermissions.requestPermissions(this, getString(resString), RC_PERM, mPerms);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -299,14 +299,14 @@ public class UserInfoActivity extends BaseBindingActivity<ActivityUserInfoBindin
|
||||
}
|
||||
|
||||
private void initUserDetail(UserDetailInfo.DataBean info) {
|
||||
|
||||
if (info == null){
|
||||
return;
|
||||
}
|
||||
initGiftList(info.getUserGiftWall());
|
||||
initDynamicList(info.getDynamicInfo());
|
||||
initPhoto(info.getPrivatePhoto());
|
||||
// if (AuthModel.get().getCurrentUid() != userId){
|
||||
mRoomUid = info.getRoomUid();
|
||||
setWhereVisible();
|
||||
// }
|
||||
mRoomUid = info.getRoomUid();
|
||||
setWhereVisible();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -386,6 +386,9 @@ public class UserInfoActivity extends BaseBindingActivity<ActivityUserInfoBindin
|
||||
* 相册
|
||||
*/
|
||||
private void initPhoto(List<UserDetailInfo.DataBean.PrivatePhotoBean> list){
|
||||
if (ListUtils.isListEmpty(list)){
|
||||
return;
|
||||
}
|
||||
TextHintView hintView = new TextHintView(this);
|
||||
hintView.setBackground(getResources().getDrawable(R.drawable.bg_userinfo_photo_hintview));
|
||||
hintView.setTextSize(SizeUtils.dp2px(this,4));
|
||||
|
@@ -147,7 +147,7 @@ public class QuickLoginUiConfig {
|
||||
context.getWindow().getWindowManager().getDefaultDisplay().getMetrics(dm);
|
||||
int dialogWidth = (int) (Utils.getScreenDpWidth(context) * 0.85);
|
||||
int dialogHeight = (int) (Utils.getScreenDpHeight(context) * 0.7);
|
||||
UnifyUiConfig uiConfig = new UnifyUiConfig.Builder()
|
||||
return new UnifyUiConfig.Builder()
|
||||
// 设置导航栏
|
||||
.setNavigationTitle("一键登录/注册")
|
||||
.setNavigationTitleColor(Color.RED)
|
||||
@@ -206,12 +206,11 @@ public class QuickLoginUiConfig {
|
||||
.addCustomView(otherLoginRel, "relative", UnifyUiConfig.POSITION_IN_BODY, null)
|
||||
.addCustomView(closeBtn, "close_btn", UnifyUiConfig.POSITION_IN_TITLE_BAR, new LoginUiHelper.CustomViewListener() {
|
||||
@Override
|
||||
public void onClick(Context context, View view) {
|
||||
Toast.makeText(context.getApplicationContext(), "点击了右上角X按钮", Toast.LENGTH_SHORT).show();
|
||||
public void onClick(Context context1, View view) {
|
||||
Toast.makeText(context1.getApplicationContext(), "点击了右上角X按钮", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
})
|
||||
.setDialogMode(true, dialogWidth, dialogHeight, 0, 0, false)
|
||||
.build(context.getApplicationContext());
|
||||
return uiConfig;
|
||||
}
|
||||
}
|
||||
|
@@ -250,29 +250,23 @@ public class RoomMsgRecentContactsFragment extends TFragment {
|
||||
private void showLongClickMenu(final RecentContact recent, final int position) {
|
||||
CustomAlertDialog alertDialog = new CustomAlertDialog(getActivity());
|
||||
alertDialog.setTitle(UserInfoHelper.getUserTitleName(recent.getContactId(), recent.getSessionType()));
|
||||
String title = getString(R.string.main_msg_list_delete_chatting);
|
||||
alertDialog.addItem(title, new onSeparateItemClickListener() {
|
||||
@Override
|
||||
public void onClick() {
|
||||
// 删除会话,删除后,消息历史被一起删除
|
||||
NIMClient.getService(MsgService.class).deleteRecentContact2(recent.getContactId(), recent.getSessionType());
|
||||
NIMClient.getService(MsgService.class).clearChattingHistory(recent.getContactId(), recent.getSessionType());
|
||||
}
|
||||
String title = "删除该聊天";
|
||||
alertDialog.addItem(title, () -> {
|
||||
// 删除会话,删除后,消息历史被一起删除
|
||||
NIMClient.getService(MsgService.class).deleteRecentContact2(recent.getContactId(), recent.getSessionType());
|
||||
NIMClient.getService(MsgService.class).clearChattingHistory(recent.getContactId(), recent.getSessionType());
|
||||
});
|
||||
|
||||
title = (isTagSet(recent, RECENT_TAG_STICKY) ? getString(R.string.main_msg_list_clear_sticky_on_top) : getString(R.string.main_msg_list_sticky_on_top));
|
||||
alertDialog.addItem(title, new onSeparateItemClickListener() {
|
||||
@Override
|
||||
public void onClick() {
|
||||
if (isTagSet(recent, RECENT_TAG_STICKY)) {
|
||||
removeTag(recent, RECENT_TAG_STICKY);
|
||||
} else {
|
||||
addTag(recent, RECENT_TAG_STICKY);
|
||||
}
|
||||
NIMClient.getService(MsgService.class).updateRecent(recent);
|
||||
|
||||
refreshMessages(false);
|
||||
title = (isTagSet(recent, RECENT_TAG_STICKY) ? "取消置顶" : "置顶该聊天");
|
||||
alertDialog.addItem(title, () -> {
|
||||
if (isTagSet(recent, RECENT_TAG_STICKY)) {
|
||||
removeTag(recent, RECENT_TAG_STICKY);
|
||||
} else {
|
||||
addTag(recent, RECENT_TAG_STICKY);
|
||||
}
|
||||
NIMClient.getService(MsgService.class).updateRecent(recent);
|
||||
|
||||
refreshMessages(false);
|
||||
});
|
||||
|
||||
alertDialog.addItem("删除该聊天(仅服务器)", new onSeparateItemClickListener() {
|
||||
|
@@ -13,6 +13,7 @@ buildscript {
|
||||
maven { url 'https://jitpack.io' }
|
||||
google()
|
||||
jcenter()
|
||||
maven {url 'https://developer.huawei.com/repo/'}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -22,6 +23,7 @@ buildscript {
|
||||
// android 资源混淆插件
|
||||
classpath 'com.tencent.mm:AndResGuard-gradle-plugin:1.2.16'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
classpath 'com.huawei.agconnect:agcp:1.3.1.300'
|
||||
|
||||
}
|
||||
}
|
||||
@@ -36,7 +38,7 @@ allprojects {
|
||||
maven { url "http://mvn.mob.com/android" }
|
||||
maven { url 'https://dl.bintray.com/umsdk/release' }
|
||||
maven { url 'https://dl.bintray.com/linkedme2016/lkme-deeplinks' }
|
||||
maven { url 'http://developer.huawei.com/repo/'}
|
||||
maven { url 'https://developer.huawei.com/repo/'}
|
||||
}
|
||||
//网络慢的话就去 https://maven.aliyun.com/mvn/view 里面找个代理的仓库。
|
||||
}
|
||||
|
@@ -21,5 +21,5 @@ with_jenkins=false
|
||||
#\u6253\u652F\u6301x86\u7684\u6A21\u62DF\u5668\u5305\u4F7F\u7528
|
||||
ndk_abi_filters=arm
|
||||
|
||||
version_name=1.2.0
|
||||
version_code=120
|
||||
version_name=1.2.1
|
||||
version_code=121
|
Reference in New Issue
Block a user