0

According to documentation, onInitializeTasks(https://developers.google.com/android/reference/com/google/android/gms/gcm/GcmTaskService.html#onInitializeTasks()) is called whenever client side app/play services are updated. Can I safely use this callback to capture events when my app gets updated by play store? Is there any known exception to the behavior?

  • what you mean by all app upgrade events. – Bhuvanesh BS Aug 22 '17 at 05:47
  • By all app upgrade events, I meant that whenever my app gets updated by play store Question edited to remove ambiguity. – Vikramjit Singh Aug 22 '17 at 10:03
  • You may check this [documentation](https://github.com/filipproch/gcmnetworkmanager-android-example/blob/master/README.md) for more information regarding `onInitializeTasks`. Usually, this method is called each time your package is removed or updated (taken from docs). Unfortunately, there is again no way to simple say: "I want to reschedule all my previous tasks". At the moment this method is called, they are all already canceled. You have to figure out somehow (maybe store it in configuration or whatever) which task you want to reschedule and reschedule them here. – abielita Aug 23 '17 at 17:45
  • Right. I understand that. But, can I use the same to do something every time my app is updated on the client? Other than rescheduling the tasks? – Vikramjit Singh Aug 24 '17 at 11:59

0 Answers0