How to send notifications from a college server to students mobiles? - android-notifications

I am building an app for colleges and they want to have push notification function in their app but from their college server side they want to send notification. I have tried to send notification from FCM but i have build it from my fcm id. So how to transfer it to college server? Any idea?

Building the client-side app is only half of the solution. You have to work with the college to build an application server that will actually send the notifications to Google/Firebase.
Firebase notifications work like this:
(A) Your App Server (college) -> (B) Google/Firebase -> (C) Your App (on user devices) You only have B & C set up, but you need to create A.
The Firebase Cloud Notification site has all the information about setting up a notification server, but you will probably need to work with the existing college IT staff / networking administrators.

Related

Kafka Based Notification Engine for sending push notifications to Android and iOS apps

I am designing a Notification Engine (Java Based) which will be used as an one stop shop for various other systems to send notification to different channels (push notifications, SMS, email etc). I wish to build this system to use Kafka as a message broker component (there will be many other components as well).
My query is specific to app push notifications (our current system uses FCM topic based subscribed notifications coming from individual systems who publish). The New Notification Engine will be working as the Kafka Producer and publish messages in regular intervals ( as configured in the Scheduler Component of this system) to the topics. How do the app user get the notifications as soon as they are published ? I am assuming the apps here have to work as Kafka Consumer. What is the best way to achieve this ? Is Kafka REST Proxy an option for the Mobile Apps to act like Kafka Consumers ? Would it be overload for mobile app to handle all the consumer responsibility ?

How to send request from server side (asp.net web api / mvc ) to xamarin forms app?

i need recommendations from you. I have a project which use web api back end and xamarin forms. Xamarin forms is multi-user apps. Depends to user location it sends post or get request to server side and some actions occur. But what to do when i need to send something to xamarin app from web api without request from it ?????? I mean when some event happen i need to send something like push notification to specific user in xamarin app ???? (like uber send notification to drivers or riders). How to implement this ???? i was thinking to use SignalR but not sure....please help ??? thnks in advance
If your goal is to implement real time communication (when the app is open or running in the background), you could use SignalR. However, SignalR won't allow you to have real notifications mechanism (i.e. getting a push notification when the app is closed and click on it to open the app). Using SignalR, your app UI would get updated if app is open but that's it because SignalR relies on active connections.
If you really want to implement push notifications, you should check the following links:
Firebase Cloud Messaging
Using FCM, app servers can send messages to a single device, to a
group of devices, or to a number of devices that are subscribed to a
topic. A client app can use FCM to subscribe to downstream messages
from an app server (for example, to receive remote notifications).
If needed: How to use it with Azure
Hope it helps!

Web push notifications

I am making a website and one of the features is that whenever a contract is nearing its end, the user should be notified about it. So I was looking for a way to notify users and I found out about push notifications.
Now, there are lots of things written about it. I heard a lot about Google Cloud Messaging, Firebase Cloud Messaging and Service Workers.
Now the thing is that my website will probably be on an Intranet. So maybe I won't be able to use GCM/FCM.
But I have a few questions regarding GCM, FCM and Service-Workers:
Why do I need FCM/GCM?
What is the difference between FCM and Service Workers?
Is there a way to push notifications even if the browser is closed?
Because my website is on an Intranet, is there another way to push notifications to the users?
1. Why do I need FCM/GCM?
You may check here the features of FCM.
Notification payload: 4KB, Message payload: 2KB. Note that the notification includes device and app information too.
Stores 100 notification/messages per device if the device is offline.
Stores notification/messages for 30 days if the device is offline, and deleted them all one this period is over and the device is still offline.
FCM supports Android and iOS devices, and even chrome web apps. The notifications are sent to iOS devices in this way: App Server -> FCM -> Apple Push Notification Server (APNs) -> iOS device -> App.
GCM supports 1 million subscribers while FCM do not have this limitation.
Supports programming in C++.
Less requirements for coding.
2. What is the difference between FCM and Service Workers?
Service Worker is a background service that handles network requests. Ideal for dealing with offline situations and background syncs or push notifications. Cannot directly interact with the DOM. Communication must go through the Service Worker’s postMessage method. Service Workers are pretty perfect for creating offline-first web apps. They let you interact with the server when you can (to fetch new data from the server, or push updated info back to the server), so your app can work regardless of your user’s connectivity.
While using FCM, you can notify a client app that new email or other data is available to sync. You can send notification messages to drive user reengagement and retention. For use cases such as instant messaging, a message can transfer a payload of up to 4KB to a client app.
3. Is there a way to push notifications even if the browser is closed?
Check this thread: Notifications while browser is closed
4. Because my website is on an Intranet, is there another way to push notifications to the users?
Unfortunately, I don't see any documentation regarding this.
Hope my answers help you.

Does Apple (APN) and Google (GCM) servers tell you what devices have registered for push notifications?

To use the Google Cloud Messaging (GCM) service, you need to know the registration ID of the device. The registration ID is created if the Android app uses the GCM client to register itself. Is it possible for a server which sends GCM messages to get a list of all registration IDs for a certain app, or do the apps have to send their IDs to the server (during login for instance) ? If yes, is it possible to get a list of all device tokens for all installed iPhone apps to send Apple Push Notifications (APN) as well?
No, there is no way to get that list of registration IDs from Google nor that list of device tokens from Apple. Your app must send them to your server and your server must maintain that list.

apns service conformation procedure

once i submitted app to app store by enabling push notifications for that particular app id and i generated the certificate fro production and i saved in my server.
now i want to test my push notifications are working or not,now my doubt is if i use the same bundle id for my another project and keeping the same certificate which i generated for production apns on my server. if i send notifications now to that certificate will notifications work or won't work. i was confused totally after having lot of discussion with my friend.
in my point of view they won't work,but i am unable to clarify him clearly,let me know what is process once we send a notification to apple server by using particular certificate. whether it looks fro bundle identifiers or any thing
thankyou......
The process of push notification is that your server send message with the attachment of device token you added in the server end.
On apple server apple fetch the device token and send the message to the device token you send.
Now when the message received in iPhone, iphone check the bundle identifier that was registered with the certificate you have created at server level while enabling push notification.
And if that identifier matches with any of the app you have in your iPhone whether it`s the same app you have registered your push or other. It will only check the bundle identifier and show the notification on your device.
Now both the production and developer certificates are different so it will not show the notification if you are sending push from certificates generated with developer mode and checking on production application.
Regards
Abhishek Goyal

Resources