2

I heard that GCM get's deprecated on April 11, 2019. I have implemented GCM Network manager in my project, I am running service persistently in the background, though internet connectivity on or off.

Firebase job dispatcher is not running like GCM Network Manager?

This is the following code:

Job myJob = mDispatcher.newJobBuilder()
            .setService(MyJobService.class)
            .setTag(JOB_TAG)
            .setRecurring(true)
            .setTrigger(Trigger.executionWindow(5, 30))
            .setLifetime(Lifetime.FOREVER)
            .setReplaceCurrent(false)
            .setConstraints(Constraint.ON_ANY_NETWORK)
            .setRetryStrategy(RetryStrategy.DEFAULT_LINEAR)
            .build();
    mDispatcher.mustSchedule(myJob);
    Toast.makeText(this, R.string.job_scheduled, Toast.LENGTH_LONG).show();
Sai
  • 278
  • 3
  • 7
  • firebase job are basically for scheduling [check this](https://www.bignerdranch.com/blog/choosing-the-right-background-scheduler-in-android/) – Vinay Sasalatti Apr 24 '18 at 09:05
  • I have implemented firebase job dispatcher, but still not working perfectly like GCM Network manager? – Sai Apr 26 '18 at 12:16
  • Instead of this question (which you should delete), why don’t you ask specifically what “is not working perfectly” and what have you tried that didn’t fix the problem? This is not a Code-Review site or a place to speculate with uncertainty. :) – Martin Marconcini Apr 27 '18 at 18:07
  • Hi @MartinMarconcini, I have edited my question. Please check and tell me the possibility. How to overcome this issue. – Sai May 03 '18 at 07:11

1 Answers1

0

The GitHub documentation for Firebase Job Dispatcher clearly states:

This library uses the scheduling engine inside Google Play services(formerly the GCM Network Manager component) to provide a backwards compatible (back to Gingerbread) JobScheduler-like API.

AL.
  • 36,815
  • 10
  • 142
  • 281