The GcmListenerService handles wakelock for us. The onMessageReceived method runs in a thread pool (not on the main UI thread) so it seems as if the intention was to allow long running tasks to be executed on this method.
My question is whether there is some kind of a runtime limit of this method when GCM is received. Basically I would want to download a few images during the run of this method and then post a notification to the user, and be certain that the device does not go to sleep and finishes its execution.
As far as I understand, the fact that GcmReceiver and GcmListenerService take care of a wakeup lock for us, allows us to do the heavy tasks on this method and be certain that it finishes. Is this true?