I’m trying to track user sessions in my Zeroqode wrapped Native app.
Does anyone know of a way a plugin or another way to trigger a workflow when the app is moved to the background and when the app is closed?
I’m trying to track user sessions in my Zeroqode wrapped Native app.
Does anyone know of a way a plugin or another way to trigger a workflow when the app is moved to the background and when the app is closed?
Hi @cohereandnow,
Thank you for your message.
The Air Native plugin includes an event that detects when the app is brought back from the background.
However, it doesn’t currently provide an event specifically for when the app is terminated or closed. We’ve added this idea to our list for future plugin improvements and will explore the feasibility of implementing two new events. We’ll keep you updated on any progress, but please note that we can’t offer a specific timeline at this time. Thank you for your understanding.
If you need to track when the app is terminated, you might want to explore other plugins or consider custom native development that incorporates lifecycle management through native code (using Swift for iOS or Kotlin/Java for Android).
As a workaround, you could use the Usage Duration and Session parameters from the OneSignal Console, along with the API Connector in your Bubble app, to track user activity.
For more details, you can refer to the OneSignal API Guide:
Hope this helps with your specific use case.
Best regards,
Zeroqode Support Team.