For questions related to Android service that is used to schedule tasks for Google Cloud Messaging.
Questions tagged [gcmtaskservice]
26 questions
70
votes
1 answer
Firebase JobDispatcher - how does it work compared to previous APIs (JobScheduler and GcmTaskService)?
Background
Google has multiple solutions for job/task scheduling, such as JobScheduler and GcmTaskService. Each has its own advantages and disadvantages.
Recently, Google presented a new library called "Firebase JobDispatcher".
The problem
Sadly,…

android developer
- 114,585
- 152
- 739
- 1,270
21
votes
2 answers
Some questions about GcmTaskService
Background
I wanted to use the new JobScheduler API that was presented on Lollipop, but sadly it doesn't have an official port for pre-Lollipop.
However, there is the GcmTaskService, which provides very similar functionalities.
The problem
This API…

android developer
- 114,585
- 152
- 739
- 1,270
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
3
votes
0 answers
What happens to the scheduled jobs in which its class is deleted in the updated app version
Let's say I use a JobService on my current app version. Then in the next app version, I want to delete the JobService class because I no longer need it. Is is safe to do so or do I need to take a phased approach where I keep the JobService class and…

mgk
- 31
- 1
3
votes
1 answer
GcmTaskService not triggered for some users
We are using GcmTaskService for uploading entities created by the user asynchronously to our server.
This is working for couple of thousands of users without any issues, but for at least two users the tasks get scheduled but will never run.
We use…

crysxd
- 3,177
- 20
- 32
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
2
votes
0 answers
GCMTaskService - One Off Task setPersisted, setRequiredNetwork(Task.NETWORK_STATE_CONNECTED) and setRequiresCharging Android
I want to ask few questions related to GCM One off Task in Android. Read many docs but unsure of the following:
Does One off task supports setPersisted? If yes, what is the default value.
What is the exact meaning of NETWORK STATE CONNECTED ? Does…

Sakshi Gupta
- 116
- 11
2
votes
2 answers
Using GoogleAPIClient in Background Services
My scenario is that I would like to have a service periodically obtain some information (eg. location of user), report it to my server and receive a push notification if the location matches some X location.
I would to get some advice on what would…

pkramaric
- 165
- 2
- 13
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
1
vote
0 answers
Syncing GcmTaskService with database changes
I have a problem with GcmTaskService. when I try to update database inside an activity before creating GcmTaskService , It seems like database is not updated and the previous values still remain. here is my GcmTaskService
public class…

Moonlight
- 232
- 2
- 5
- 18
1
vote
1 answer
How to Remove an unused GcmTaskService service?
I have this code GcmTaskService service code that check internet is ok to push some data online :
public class NetworkChangeService extends GcmTaskService {
public static String TAG = "NetworkChangeService";
private static long ONE_HOUR_IN_SECONDS…

KeitelDOG
- 4,750
- 4
- 18
- 33
1
vote
0 answers
GSMTaskManager onRunTask calls MainActivity method?
I have an app that the MainActivity has a method (called doUpdate()) that is called from a button hit. This uses the MainActivity's public variables to access a database, perform some updates, and update some records. This works well.
We now need…

Peter
- 427
- 4
- 14
1
vote
0 answers
GcmTaskService: cancelling and scheduling a tag for a task which is currently processing
With GcmNetworkManager, my understanding is two tasks with same tag can never run concurrently. This is according to documentation here
Per service, two tasks with the same tag will never execute
concurrently. Should a newly-scheduled task arrive…

Don Box
- 3,166
- 3
- 26
- 55
1
vote
0 answers
GcmTaskService from other package
Can I schedule a task for a GcmTaskService from another package? I still can start an ordinary service from other package as a wrapper. But maybe there is a way to get rid of
There is no GcmTaskService component registered within this package.…

Ivan Tamashevich
- 291
- 1
- 5
- 14