This function cancels the given push notification. You can get the ID for the notification to cancel using the functions push_get_first_local_notification() and push_get_next_local_notification() and the function will return true on success or false otherwise (for example if the notification does not exist or has already been triggered).NOTE: This function is limited to the iOS and Android target modules.
|ID||The ID of the notification to cancel.|
var map = ds_map_create();
var ntf = push_get_first_local_notification(map);
while(ntf >= 0)
var data = ds_map_find_value(map, "data");
if data == "Daily_Reward"
ntf = push_get_next_local_notification(map);
The above code creates a ds_map and then requests data for the first available notification in the queue. If a notification exists, the map is populated and the code then checks the "data" key for a specific string. If the string is found, the notification is canceled and moves on to check the next notification until all in the queue have been checked.