Send event to mobile app when chatbot open in background for certain time

When we are opens chatbot inside mobile app, & putting app in background for certain time,and roaming into other apps, then how can we send event from chatbot to app?

Can anyone please suggest solution here?