https://www.b4x.com/android/forum/threads/firebase-jobdispatcher.85613/
The wish here is about the firebase Jobdispatcher.
For this one need to write a service which then extends their JobService. Inside this service the developer need to answer (give a true/false result).
Is it possible to raise an event in B4A (probably used inside starter) from this java-service AND to get back an Answer from the B4A Event which is raised?
This is a basic service for this...
In onStartJob for example i would like to raise an event to b4a.
But it must be somehow synchronours or so. I need to get the answer to return true/false to the base service...
Can someone help me with an example on how this would work?
The wish here is about the firebase Jobdispatcher.
For this one need to write a service which then extends their JobService. Inside this service the developer need to answer (give a true/false result).
Is it possible to raise an event in B4A (probably used inside starter) from this java-service AND to get back an Answer from the B4A Event which is raised?
This is a basic service for this...
B4X:
import com.firebase.jobdispatcher.JobParameters;
import com.firebase.jobdispatcher.JobService;
public class MyJobService extends JobService {
@Override
public boolean onStartJob(JobParameters job) {
// Do some work here
return false; // Answers the question: "Is there still work going on?"
}
@Override
public boolean onStopJob(JobParameters job) {
return false; // Answers the question: "Should this job be retried?"
}
[..]
}
But it must be somehow synchronours or so. I need to get the answer to return true/false to the base service...
Can someone help me with an example on how this would work?