Sreejith sreeji
Sreejith sreeji

Reputation: 1381

Android push notification without firebase

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?

Upvotes: 106

Views: 94521

Answers (3)

Saeid Doroudi
Saeid Doroudi

Reputation: 1235

another option is Gotify. Gotify is self-hosted open source notification solution that you can use it to send push notification to your android app without need of Firebase.

with help of UnifiedPush you can receive push notifications in your android app.

you can easily host Gotify server on Docker and use it's Api or cli,... to send notifications.

here is a good article about Gotify: https://www.linux-magazine.com/Issues/2020/230/Gotify

Upvotes: 7

atlascoder
atlascoder

Reputation: 3063

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

Upvotes: 37

Zibri
Zibri

Reputation: 9837

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.

Upvotes: 7

Related Questions