This commit is contained in:
18142669586
2022-08-17 13:34:29 +08:00
parent 121e07f915
commit 2c248681ca
9 changed files with 55 additions and 11 deletions

View File

@@ -91,6 +91,14 @@
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true"
tools:replace="theme,label,icon,allowBackup">
<service
android:name="io.rong.push.platform.google.RongFirebaseMessagingService"
android:stopWithTask="false"
android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT"/>
</intent-filter>
</service>
<activity
android:name="com.shayu.phonelive.activity.LauncherActivity"
android:screenOrientation="portrait"
@@ -144,6 +152,12 @@
android:name="com.facebook.sdk.ClientToken"
android:value="@string/facebook_client_token" />
<meta-data android:name="com.facebook.sdk.AutoLogAppEventsEnabled" android:value="false"/>
<meta-data
android:name="firebase_messaging_auto_init_enabled"
android:value="false" />
<meta-data
android:name="firebase_analytics_collection_enabled"
android:value="false" />
</application>
</manifest>

View File

@@ -41,6 +41,8 @@ import io.rong.imlib.IRongCoreListener;
import io.rong.imlib.RongIMClient;
import io.rong.imlib.model.Conversation;
import io.rong.message.TextMessage;
import io.rong.push.RongPushClient;
import io.rong.push.pushconfig.PushConfig;
import static com.yunbao.live.socket.SocketClient.mSocketHandler;
@@ -116,6 +118,12 @@ public class AppContext extends CommonAppContext {
}
ARouter.init(this);
//谷歌推送
PushConfig gconfig = new PushConfig.Builder()
.enableFCM(true)
.build();
RongPushClient.setPushConfig(gconfig);
//初始化 邀请码库
if (isMainProcess()) {
OpenInstall.init(this);