Title says it all. Whether app is open or not when a notification comes in, the isActive property is always false, and I’d like to use this to determine whether to automatically process the notification (if you entered the app to see it) or give you the choice of processing it (if you were already in the app).
Here’s the relevant info from the onesignal docs:
Callback Parameters
- String message - The message text the user seen in the notification.
- Table additionalData - Key value pairs that were set on the notification.
- Table stacked_notifications - Contains a Table for each notification that exists in the stack. “message” as well as keys listed above and ones you set with additional data will be available.
- boolean isActive - True if your app was currently being used when a notification came in.
function DidReceiveRemoteNotification(message, additionalData, isActive)