-
Notifications
You must be signed in to change notification settings - Fork 394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update GCMNetworkManager to Firebase Job Dispatcher #194
Comments
We don't have any code to do this work yet but can be added. I'll consider adding this but probably post 2.0. |
How to make sure Jobs are rescheduled in the meantime? Is it that complicated to add before v2 is out of alpha? I mean, isn't this just about calling the same code that scheduled the tasks initially, i.e. a copy/paste or a method call? |
No it is not because this will require re-querying the database to find such jobs and rescheduling for them (so it is a different logic). The jobs will still be run, is just wont be re-scheduled via the JobScheduler. I really want to get out v2 so I have to cut somewhere and push for a stable release instead of adding new features. |
I see, and agree, get a stable v2 out has a higher priority. Thanks! |
Congrats for v2 release! So this will now be addressed soon, right? |
yea i need to do that :/. Meanwhile, you can probably copy GCM code and make it work for Firebase dispatcher. JobManager only uses a scheduler API so it is generic. |
So I edited the name of this issue. |
This would be great - currently trying to use this with Firebase and the firebase guide says to not use this dependency anymore with FCM |
I guess this issue, whose Firebase guys still didn't pay any attention is blocking this one, right? |
I updated to FCM from GCM and now when I run the app, I get the following error:
What can I do to resolve this? |
@pipipzz which version of GCM are you using ? I've tried updating dependency to 10.0.1 but does not create any errors :/. I try to keep version minimal so that it picks app's version but if there is an incompatibility, i'll update. |
@yigit He is not using the GCM dependency but the FCM one |
Basically, i cannot figure out what job queue will gain by moving to firebase (besides additional dependencies). It still uses GCM behind the scenes and job queue already does that. |
@yigit Only the withGcmDep productFlavor of Firebase Job Dispatcher depends and uses GCM behind the scenes if you look closer at the build.gradle file you linked, and that version isn't even updated (still released at 0.5.0 while the latest is 0.5.2). So I think using Firebase Job Dispatcher would be useful for people that don't want to use GCM anymore as it's being replaced by FCM |
I recently moved to FCM and I am unable to compile my code because there is no GCM.
|
@mwajeeh If your minSdkVersion > Lollipop, you can delete GcmJobSchedulerService, holding just FrameworkJobSchedulerService |
Hi!
After reading the GcmNetworkManager docs, I saw something written in red here, at the bottom of the page which says:
I looked at the source code (in v2alpha4), and saw that the
onInitializeTasks()
is NOT overriden, so this means that each time Google pushes an update to Google Play Services, which happens all the time, and each time I publish a newer version of my app, my app will wait until the user starts it again to run the JobManager because it's not rescheduled, right?If I'm not wrong, can you properly override this method in the library please?
It doesn't seems there's something similar with the framework's implementation,
JobScheduler
though.EDIT:
GCMNetworkManager is fading away, letting Firebase Job Dispatcher replace it. This new version seems to no longer require rescheduling after Play Services or app update, but this library needs to use it to benefit from it.
The text was updated successfully, but these errors were encountered: