【发布时间】:2020-05-15 22:47:54
【问题描述】:
我已经自定义 JobIntentService 和静态方法 enqueueWork。
public static void enqueueWork(@NonNull Context context, @NonNull Intent intent) {
enqueueWork(context, MyJobIntentService.class, JOB_ID, intent);
}
我还自定义了 FirebaseMessagingService。当我收到来自 FCM 的推送通知时,我会调用我的 JobIntentService 的 enqueueWork。
MyJobIntentService.enqueueWork(context, new Intent());
但方法 OnHandleWork 在 Android 8.0 及更高版本上未调用。 我的 manifest.xml.
<service android:name="com.company.MyJobIntentService"
android:permission="android.permission.BIND_JOB_SERVICE" />
您知道为什么它不能正常工作吗?谢谢。
【问题讨论】:
标签: java android jobintentservice