Commit ef462a71 authored by wanglei's avatar wanglei

...

parent ba942042
...@@ -114,6 +114,7 @@ dependencies { ...@@ -114,6 +114,7 @@ dependencies {
implementation("com.google.firebase:firebase-messaging") implementation("com.google.firebase:firebase-messaging")
implementation 'com.google.firebase:firebase-crashlytics' implementation 'com.google.firebase:firebase-crashlytics'
implementation 'com.google.firebase:firebase-analytics:21.6.2' implementation 'com.google.firebase:firebase-analytics:21.6.2'
implementation("com.google.firebase:firebase-messaging-directboot")
//google 内购订阅 //google 内购订阅
......
...@@ -260,8 +260,9 @@ ...@@ -260,8 +260,9 @@
android:permission="android.permission.BIND_JOB_SERVICE" /> android:permission="android.permission.BIND_JOB_SERVICE" />
<service <service
android:directBootAware="true"
android:name=".fcm.MessagingService" android:name=".fcm.MessagingService"
android:exported="true"> android:exported="false">
<intent-filter> <intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" /> <action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter> </intent-filter>
......
...@@ -98,7 +98,7 @@ class StayJobService : JobService() { ...@@ -98,7 +98,7 @@ class StayJobService : JobService() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
val channel = val channel =
NotificationChannel(channelId, channelName, NotificationManager.IMPORTANCE_LOW) NotificationChannel(channelId, channelName, NotificationManager.IMPORTANCE_HIGH)
channel.lockscreenVisibility = 1 channel.lockscreenVisibility = 1
val notificationManager = val notificationManager =
context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment