Issue with push notification

D

Dhiyananth

Guest
Hi All,
I'm trying to include push notification for my game, but when i try with sample code i'm getting the notification if the game is running in background and it is not coming when the game is completely closed.

Can you please help me to get the push notification when the app is completely closed.

PFB the code which i'm using

Object Create event

Code:
 date_inc_minute(date_current_datetime(), 2);
 var data = "coin_collection";
 push_local_notification(fireTime, "Ahoy!", "Hey! Coins are waiting for you, come and collect it", data);
Push Notification event

Code:
var type = ds_map_find_value(async_load, "type");
 var status = ds_map_find_value(async_load, "status");
 if status == 0
    {
    //error of some kind
    var error = ds_map_find_value(async_load, "error");
    show_debug_message("error=" + string(error));
    }
 else
    {
    if type == "register"
       {
       global.reg_id = ds_map_find_value(async_load, "reg_id");
       }
    else
       {
       var data = ds_map_find_value(async_load, "data");
          if data == "coin_collection"
          {
          global.Gold += 1000;
          }
       }
    }
 
Top