Push notification after onDestroy

366 Views Asked by At

I have learnt how to send a push notification, it works well but I need to send a notification to the user even after the app has been closed. So far I know how to send it while the application is running. How do you send a notification when app is in the background or when its even closed, on Android?

1

There are 1 best solutions below

1
On BEST ANSWER

There are many answers to this, you could use a Service in background and through that you could do, that service would be running at all times. If you want your notification to be popped up at some specific point of time, you can specifically use BROADCAST RECEIVER. And with the help of PENDING INTENT, you can easily achieve this task. About all the above keywords stated, you can easily find in the documentation of Android online. Hoping that I was helpful... In case of any more queries... Do ask and clarify. Thank you...