Questions tagged [gcm-network-manager]
35 questions
13
votes
2 answers
GCMNetworkManager isn't running PeriodicTask after reboot
The app shows expected behavior if the app is running in the foreground, background or killed. However, once it is rebooted the PeriodicTask stops running
Following are the relevant bits of code:
In AndroidManifest:

ranjjose
- 2,138
- 1
- 24
- 46
13
votes
4 answers
GcmNetworkManager scheduling issues
I am using GcmNetworkManager in my application for periodic and one of task task execution. I am getting these 2 errors and unable to figure out the reason. Implementation is correct as i am unable to reproduce these issue on staging.
Fatal…

user2662821
- 225
- 3
- 12
10
votes
1 answer
Android. GcmNetworkManager on Firebase SDK?
After Firebase was announced at Google I/O 2016 I've read about migration of some changes that will affect my code, GCM to FCM, Analytics related changes etc...
but I didn't found any information about GcmNetworkManager , what happens with it ?
We…

koleanu
- 495
- 5
- 20
7
votes
2 answers
GCM Network Manager losing jobs
I am trying to use GCM Network Manager to send logs to out backend service. We have an alarm running about every hour that creates a OneoffTask that, when executed, will call the backend service with the log message.
This works, BUT a very large…

Mattias Petter Johansson
- 1,064
- 1
- 15
- 32
5
votes
4 answers
How to schedule a task in android which will run on immediately after internet is available and reschedule it if fails?
Need scheduler to
Run task immediately after net is available
Reschedule task if it fails because of some problems.
should handle cases of broadcast receiver to know if connection available
No delay in execution if the internet is already available…

Gopinath Langote
- 311
- 4
- 10
5
votes
1 answer
How can I query GcmNetworkManager to see if my task is scheduled or not?
I have scheduled a task to run periodically using GcmNetworkManager, but I don't want it to be persisted, because I don't want to add android.Manifest.permission.RECEIVE_BOOT_COMPLETED to list of the permissions my application requires. So, I am…

iMan Biglari
- 4,674
- 1
- 38
- 83
5
votes
1 answer
GcmNetworkManager OneoffTask ExecutionWindow needed?
I am starting to implement the GcmNetworkManager to trigger a sync when the user gets their internet connection back
When looking at the docs for the OneoffTask it says that setExecutionWindow is mandatory
Mandatory setter for creating a one-off…

tyczj
- 71,600
- 54
- 194
- 296
3
votes
1 answer
Change the period of a periodic task in Firebase JobDispatcher?
I was using GCM network manager, but then I heard that Firebase JobDispatcher includes GCM plus other features so I'm trying to use that.
I have successfully programmed a periodic task and it works fine, but the problem is that I need the period to…

student93
- 307
- 2
- 12
3
votes
1 answer
When will the oneOffTaks be executed again with result GcmNetworkManager.RESULT_RESCHEDULE
So from Android SDK for GcmNetworkManager
public static final int RESULT_RESCHEDULE
Indicates a task has failed to execute, and must be retried with
back-off.
Task task = new OneoffTask.Builder()
.setService(MyService.class)
…

Xiaogegexiao
- 111
- 1
- 5
3
votes
0 answers
How to find internet disconnected using GCM Network manager?
I am using GCM network manager in android to notify me if internet is available. But how to notify if internet is disconnected. What is the way . Thanks in advance. One ore thing is i dont want to use Broadcast receiver because NETWORK_CHANGED…

Nandha Kumar
- 65
- 7
2
votes
0 answers
GcmNetworkManager OneoffTask called very often, Problems detecting network state changes on Android N
I need that the app wakes up when the network state changes, even when not running in the background.
Before Android N, I had a network state change registered in the Manifest
…

stamanuel
- 3,731
- 1
- 30
- 45
2
votes
1 answer
make GcmNetworkManager periodic task work even after exiting the app?
I need a periodic task that require internet connection and persists after reboots. I have achieved that much but the problem is that I want the app to continue working even adter I exit it.
As in, if I exist the app and turn off wifi and then turn…

student93
- 307
- 2
- 12
1
vote
1 answer
how to install Network Manager on ubuntu?
Can anyone help me to install network-manager-l2tp on ubuntu 16.04?
I get this error:
The following packages have unmet dependencies:
network-manager-l2tp : Depends: xl2tpd (>= 1.3.6+dfsg-4ubuntu0.16.04.1) but 1.3.6+dfsg-4 is to be installed
I also…

Shahab Einabadi
- 307
- 4
- 15
1
vote
1 answer
Is there any ways to detect the exact time that user turns off WIFI or Data?
I searched and it turns out that Broadcast Receiver is not recommended for the target over N.
I found out GCMNetworkManager. And it is also depreciated.
I also checked JobScheduler. However, its behaviour is not something that I want to…

c-an
- 3,543
- 5
- 35
- 82
1
vote
0 answers
Scheduling a long task in GCMNetworkManager
I am using a GCMNetworkManager to schedule a background task. My task is to download content from the server which sometimes could take even upto 7 minutes.
In this case, will the GCMTaskManager hold the wake lock this long? If not, how do I…

DevAndroid
- 1,150
- 1
- 10
- 23