Scheduling a long task in GCMNetworkManager

67 views Asked by At

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.

  1. In this case, will the GCMTaskManager hold the wake lock this long? If not, how do I handle the situation?

  2. Can I start a service from the onRunTask() method in my class extending from GcmTaskService? Will it throw an IllegalStateException in Android 8.0 (Oreo) if the application is in background when the task runs?

0

There are 0 answers