I want to send android push notification to the selected user without using gcm or firebase. The application is already built without firebase. Now I need to integrate push notification too.
Question:
Actually I want a feature that, when an admin update the value in the one field in database table of particular user, the that user will get a push notification regarding the update. How it is possible?
How it is possible? It's definitely possible -- you don't have to use Firebase to deliver push notifications.
Navigate to Settings > Mobile Apps. Click the mobile app for which you'd like to send a push notification. For Device Token, enter the token you located above. For Message, enter a message to display in the push notification.
Pushed allows you to send real-time notifications without developing your own app to iOs, Android and Desktop devices.
Send messages to any device Firebase Cloud Messaging (FCM) provides a reliable and battery-efficient connection between your server and devices that allows you to deliver and receive messages and notifications on iOS, Android, and the web at no cost.
The way is to create custom Service https://developer.android.com/reference/android/app/Service.html , which is holding connection via socket or polling some remote server with intervals.
But, I suggest that Firebase service is more advanced and optimized in battery consumption and, particularly, in utilizing the sleep mode. It's not trivial to make a service which will have fast response and CPU consumption. I think that a custom service development will lead to native (C++) coding of networking routines libs.
Also, take into account that Firebase provides own Authentication service with ability to seamless convert your anonymous user to registered. There is a lot of pros of Firebase services. And cons are: your users have to install Google Play Services, if your app will grow - you will pay to Firebase.
Look here Android push notification without Google service
It's possible using VAPID authentication.
Google for VAPID and you will find a very tortuous road that could lead to the answer you are looking for.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With