How to add "bonusCredits" to user's total if game isn't running

Using the GameThrive code sample as a guide I was able to create a GameThrive module in my game and successfully send push notifications that add more game credits if the user clicks on the notification.  This works fine if the app is currently running as well as if the app is in the background.  But if the app isn’t running (if the device is restarted, for example), the push notification is received and if the message is clicked the app is launched, but the credits are not added to the user’s total.  (I’m trying this on Android so the notification is dismissed at this point.)

When the app is launched my GameThrive module is run, but presumably since the message has already been received it doesn’t trigger the code where I add credits from the HandleLaunchArgs listener.  I am doing this from a GameThrive module that I include in main.lua rather than directly in main.lua itself, could this be the problem?  Or am I not understanding how push or GameThrive is supposed to behave?  I’m a push Newb so any insight would be appreciated.  Thanks!

-Stephen

Hi Stephen. That’s an odd problem. We’re going to try to reproduce it ourselves and get back to your shortly.

Hi, Thanks for the quick response.  I was able to fix it myself by getting the launchargs ("…") from main and sending them to my gamethrive module, rather than getting the launchargs within the module itself.  I also had some old test code in my main.lua used to handle launchargs unrelated to gamethrive that I disabled, so perhaps there was a collision there.  One or both of those changes fixed my issue.  

-Stephen 

Hello this is Josh with GameThrive. Glad you got it working! Was just testing on Android 4.4.2 device and 2.3.4 device and it is working. Let us know if we can help out with anything else.

Thanks!

Great!  You guys are cool.  Sorry for my false alarm.

Hi Stephen. That’s an odd problem. We’re going to try to reproduce it ourselves and get back to your shortly.

Hi, Thanks for the quick response.  I was able to fix it myself by getting the launchargs ("…") from main and sending them to my gamethrive module, rather than getting the launchargs within the module itself.  I also had some old test code in my main.lua used to handle launchargs unrelated to gamethrive that I disabled, so perhaps there was a collision there.  One or both of those changes fixed my issue.  

-Stephen 

Hello this is Josh with GameThrive. Glad you got it working! Was just testing on Android 4.4.2 device and 2.3.4 device and it is working. Let us know if we can help out with anything else.

Thanks!

Great!  You guys are cool.  Sorry for my false alarm.