chore:移除厂商推送SDK

This commit is contained in:
Max
2024-01-15 19:48:30 +08:00
parent beb6c0a846
commit 527340a357
10 changed files with 5 additions and 219 deletions

View File

@@ -1,6 +1,5 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'com.huawei.agconnect'
apply from: '../mob.gradle'
apply plugin: 'android-junk-code'
apply plugin: 'com.google.gms.google-services'
@@ -238,7 +237,6 @@ dependencies {
api "com.ms-square:expandableTextView:0.1.4"
api "com.jakewharton:butterknife:10.2.3"
annotationProcessor "com.jakewharton:butterknife-compiler:10.2.3"
implementation "com.llew.huawei:verifier:1.0.3"
annotationProcessor 'androidx.annotation:annotation:1.2.0'
implementation 'io.github.h07000223:flycoTabLayout:3.0.0'
@@ -270,12 +268,6 @@ dependencies {
implementation 'it.sephiroth.android.library.imagezoom:library:1.0.4'
implementation 'com.github.fodroid:XRadioGroup:v1.5'
//华为推送
implementation 'com.huawei.hms:push:6.5.0.300'
//魅族推送
implementation 'com.meizu.flyme.internet:push-internal:4.1.0'
//oppo推送需要
implementation 'commons-codec:commons-codec:1.6'
// api 'com.tencent.vasdolly:helper:3.0.3'
implementation "io.github.tencent:vap:2.0.24"
@@ -286,11 +278,7 @@ dependencies {
}
repositories {
flatDir {
dirs 'aliyun-libs', 'com.huawei.agconnect'
}
mavenCentral()
}
android.applicationVariants.all { variant ->

View File

@@ -182,14 +182,7 @@
<action android:name="com.heytap.mcs.action.RECEIVE_MCS_MESSAGE" />
</intent-filter>
</service>
<service
android:name="com.nnbc123.app.push.OppoPushService"
android:exported="false"
android:permission="com.coloros.mcs.permission.SEND_MCS_MESSAGE">
<intent-filter>
<action android:name="com.coloros.mcs.action.RECEIVE_MCS_MESSAGE" />
</intent-filter>
</service> <!-- 云信集成oppo推送 end -->
<!-- 云信集成oppo推送 end -->
<!-- 云信集成华为推送 start -->
<service
android:name="com.netease.nimlib.mixpush.hw.HWPushService"
@@ -227,7 +220,7 @@
<receiver
android:name="com.xiaomi.push.service.receivers.NetworkStatusReceiver"
android:exported="true"
tools:node="remove">>
tools:node="remove">
<intent-filter>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
@@ -251,15 +244,7 @@
<action android:name="com.xiaomi.mipush.ERROR" />
</intent-filter>
</receiver>
<receiver
android:name="com.nnbc123.app.push.MiPushReceiver"
android:exported="false">
<intent-filter>
<action android:name="com.xiaomi.mipush.RECEIVE_MESSAGE" />
<action android:name="com.xiaomi.mipush.MESSAGE_ARRIVED" />
<action android:name="com.xiaomi.mipush.ERROR" />
</intent-filter>
</receiver> <!-- 云信集成小米推送 end -->
<!-- 云信集成小米推送 end -->
<!-- 云信继承vivo推送 start -->
<service
android:name="com.vivo.push.sdk.service.CommandClientService"
@@ -282,24 +267,6 @@
</intent-filter>
</receiver>
<receiver
android:name="com.qiyukf.nimlib.service.NimReceiver"
android:exported="false"
android:process=":core"
tools:node="remove">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
</intent-filter>
</receiver>
<service
android:name="com.qiyukf.nimlib.job.NIMJobService"
android:exported="true"
android:permission="android.permission.BIND_JOB_SERVICE"
android:process=":core"
tools:node="remove" />
<meta-data
android:name="com.vivo.push.api_key"
android:value="8de0df98690ba00225b88313aaee754f" />
@@ -325,16 +292,7 @@
<category android:name="${applicationId}" />
</intent-filter>
</receiver>
<receiver
android:name="com.nnbc123.app.push.MeizuPushReceiver"
android:exported="false">
<intent-filter>
<action android:name="com.meizu.flyme.push.intent.MESSAGE" />
<action android:name="com.meizu.flyme.push.intent.REGISTER.FEEDBACK" />
<action android:name="com.meizu.flyme.push.intent.UNREGISTER.FEEDBACK" />
</intent-filter>
</receiver> <!-- 云信集成魅族推送 end -->
</receiver><!-- 云信集成魅族推送 end -->
<!-- 云信配置 end ##################################################### -->
<!-- &lt;!&ndash; 安卓保活配置 &ndash;&gt; -->
<!-- <service -->
@@ -378,31 +336,6 @@
android:resource="@xml/provider_paths" />
</provider>
<activity
android:name="com.nnbc123.app.push.HWPushMiddleActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="com.huawei.codelabpush"
android:path="/deeplink"
android:scheme="yinmengpushscheme" />
</intent-filter>
</activity>
<activity
android:name="com.nnbc123.core.pay.PaymentActivity"
android:launchMode="singleTask"
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" /> <!-- tinker配置 end ########################################################## -->
<!-- 支付相关配置 -->
<!-- 微信支付需要注册 -->
<activity-alias
android:name="${applicationId}.wxapi.WXPayEntryActivity"
android:exported="true"
android:targetActivity="com.nnbc123.core.pay.PaymentActivity" /> <!-- 支付相关配置 -->
<!-- shareSDK配置 end ####################################################### -->
<service
android:name="com.nnbc123.app.service.DaemonService"

View File

@@ -23,8 +23,6 @@ import com.coorchice.library.utils.LogUtils;
import com.facebook.stetho.Stetho;
import com.heytap.msp.push.HeytapPushManager;
import com.hjq.toast.ToastUtils;
import com.huawei.hms.support.common.ActivityMgr;
import com.llew.huawei.verifier.LoadedApkHuaWei;
import com.mob.MobSDK;
import com.mob.moblink.MobLink;
import com.mob.moblink.RestoreSceneListener;
@@ -218,7 +216,6 @@ public class XChatApplication extends BaseApp {
initEnv();
ActivityMgr.INST.init((Application) context);
//延迟初始化云信
NIMClient.init(context, null, options());
@@ -269,7 +266,6 @@ public class XChatApplication extends BaseApp {
lifeManager = new ActivityLifeManager();
}
registerActivityLifecycleCallback(lifeManager);
dealHuaWeiCrash();
initLinkedMe();
MobSDK.init(context);
MobSDK.submitPolicyGrantResult(true);
@@ -314,18 +310,6 @@ public class XChatApplication extends BaseApp {
BasicConfig.INSTANCE.setImageDir(Constants.IMAGE_CACHE_DIR);
}
private static void dealHuaWeiCrash() {
String brand = Build.BRAND;
String manufacturer = Build.MANUFACTURER;
if (!TextUtils.isEmpty(brand) && (
"HUAWEI".toLowerCase().equals(brand.toLowerCase())
|| "HONOR".toLowerCase().equals(brand.toLowerCase())
|| "HUAWEI".equals(manufacturer))) {
LoadedApkHuaWei.hookHuaWeiVerifier((Application) instance.getApplicationContext());
}
}
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
public static void registerActivityLifecycleCallback(Application.ActivityLifecycleCallbacks callbacks) {
((Application) instance.getApplicationContext()).registerActivityLifecycleCallbacks(callbacks);

View File

@@ -1,43 +0,0 @@
package com.nnbc123.app.push;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import com.nnbc123.app.MainActivity;
import com.nnbc123.app.avroom.activity.AVRoomActivity;
import com.nnbc123.app.ui.im.avtivity.NimP2PMessageActivity;
import com.nnbc123.app.ui.webview.CommonWebViewActivity;
import com.nnbc123.app.utils.PushMessageHandler;
public class HWPushMiddleActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Intent intent = getIntent();
if (null != intent) {
// 方法2设置的数据通过如下方式获取
Log.d("HWPush", intent.toString());
MainActivity.start(this);
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
int skiptype = intent.getIntExtra("skiptype", 0);
if (skiptype == PushMessageHandler.PAYLOAD_SKIPTYPE_INVITE_FANS) {
String roomUid = intent.getStringExtra("roomUid");
AVRoomActivity.start(HWPushMiddleActivity.this, Long.parseLong(roomUid));
} else if (skiptype == PushMessageHandler.PAYLOAD_SKIPTYPE_PRIVATE_MSG) {
String uid = intent.getStringExtra("uid");
NimP2PMessageActivity.start(HWPushMiddleActivity.this, uid);
} else if (skiptype == PushMessageHandler.PAYLOAD_SKIPTYPE_H5) {
String roomUid = intent.getStringExtra("roomUid");
CommonWebViewActivity.start(HWPushMiddleActivity.this, roomUid);
}
}
}, 2000);
}
finish();
}
}

View File

@@ -1,26 +0,0 @@
package com.nnbc123.app.push;
import android.content.Context;
import com.meizu.cloud.pushsdk.platform.message.RegisterStatus;
import com.netease.nimlib.sdk.mixpush.MeiZuPushReceiver;
import com.orhanobut.logger.Logger;
/**
* Created by lvzebiao on 2019/1/18.
*/
public class MeizuPushReceiver extends MeiZuPushReceiver {
@Override
public void onRegister(Context context, String pushId) {
super.onRegister(context, pushId);
}
@Override
public void onRegisterStatus(Context context, RegisterStatus registerStatus) {
super.onRegisterStatus(context, registerStatus);
Logger.i("魅族推送ID:" + registerStatus.getPushId());
}
}

View File

@@ -1,35 +0,0 @@
package com.nnbc123.app.push;
import android.content.Context;
import com.netease.nimlib.sdk.mixpush.MiPushMessageReceiver;
import com.orhanobut.logger.Logger;
import com.xiaomi.mipush.sdk.ErrorCode;
import com.xiaomi.mipush.sdk.MiPushClient;
import com.xiaomi.mipush.sdk.MiPushCommandMessage;
import java.util.List;
/**
* Created by lvzebiao on 2019/1/18.
*/
public class MiPushReceiver extends MiPushMessageReceiver {
@Override
public void onCommandResult(Context context, MiPushCommandMessage message) {
super.onCommandResult(context, message);
Logger.i("小米推送....");
String command = message.getCommand();
List<String> arguments = message.getCommandArguments();
if (MiPushClient.COMMAND_REGISTER.equals(command)) {
if (message.getResultCode() == ErrorCode.SUCCESS) {
String mRegID = arguments.get(0);
Logger.i("小米推送mRegID:" + mRegID);
}
}
}
}

View File

@@ -1,6 +0,0 @@
package com.nnbc123.app.push;
import com.netease.nimlib.sdk.mixpush.OppoAppPushMessageService;
public class OppoAppPushService extends OppoAppPushMessageService {
}

View File

@@ -1,6 +0,0 @@
package com.nnbc123.app.push;
import com.netease.nimlib.sdk.mixpush.OppoPushMessageService;
public class OppoPushService extends OppoPushMessageService {
}

View File

@@ -419,7 +419,7 @@ public class MessageFragment extends TFragment implements ModuleProxy, MessageLi
private JSONObject hwField(IMMessage message) {
Intent hwIntent = new Intent(Intent.ACTION_VIEW);
String intentStr = String.format(
"yinmengpushscheme://com.huawei.codelabpush/deeplink?sessionID=%s&sessionType=%s",
"yinmpushscheme://com.huawei.codelabpush/deeplink?sessionID=%s&sessionType=%s",
sessionId, sessionType
);
hwIntent.putExtra("skiptype", PushMessageHandler.PAYLOAD_SKIPTYPE_PRIVATE_MSG);

View File

@@ -12,7 +12,6 @@ buildscript {
maven { url 'https://jitpack.io' }
google()
mavenCentral()
maven {url 'https://developer.huawei.com/repo/'}
maven { url "https://mvn.mob.com/android" }
maven { url 'https://repo1.maven.org/maven2/' }
maven { url 'https://maven.aliyun.com/repository/public' }
@@ -24,7 +23,6 @@ buildscript {
classpath "io.realm:realm-gradle-plugin:5.3.0"
// android 资源混淆插件
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.huawei.agconnect:agcp:1.6.0.300'
// classpath 'com.tencent.vasdolly:plugin:3.0.3'
classpath "com.mob.sdk:MobSDK:2018.0319.1724"
classpath "com.github.qq549631030:android-junk-code:1.0.7"
@@ -40,7 +38,6 @@ allprojects {
maven { url 'https://jitpack.io' }
maven { url "https://mvn.mob.com/android" }
maven { url 'https://repo1.maven.org/maven2/' }
maven { url 'https://developer.huawei.com/repo/' }
maven { url 'https://maven.aliyun.com/repository/public' }
}
//网络慢的话就去 https://maven.aliyun.com/mvn/view 里面找个代理的仓库。