我尝试在一个单独的进程上启动JobIntentServcice,但是没有调用onHandleWork()。
Manifest.xml
<service
android:name=".service.MyService"
android:exported="false"
android:permission="android.permission.BIND_JOB_SERVICE"
android:process=":myservice">
</service>
MyService.java
public class MyService extends JobIntentService {
public static final int JOB_ID = 1001;
public static void start(Context context) {
JobIntentService.enqueueWork(context,
MyService.class,
MyService.JOB_ID,
new Intent(context, MyService.class));
}
@Override
protected void onHandleWork(@NonNull Intent intent) {
// Handle intent here.
}
}
是否可以在单独的进程上启动JobIntentService?