I am trying to build a notification system. But not a mail or sms notification. When I update a table in DB, user get web-browser notification(kind a facebook style) But I am little bit a stuck. I know Laravel has a system for this and when I search the internet people keep saying need pusher and tutorials all about e-mail notification. Not a database update and send web-message? What is the correct way to this?
I think what you are looking for is Broadcasting
You can find more information about it here:
https://laravel.com/docs/5.7/broadcasting
Related
I am sending push notification form my server API to ios devices using google's Firebase push notification.
Right now when user receives it its structure is simple, there is a title and a message.
Can I add custom buttons in it? For example two buttons, one to accept the action and the other to reject it.
I have read the documentation but I could not find anything concerning code.
I know I am stating my problem straight away here.
Can somebody please guide me in this?
Thank You
We have firebase chat application (check any chat example or tutorial) that will have same copy as our.
We would like to sent email notification or sms message, if user hasn't seen the chat message yet.
We can connect to firebase database with php and check all the messages, if they are seen or not. but It's not really proper way of doing it.
Does anyone have idea how we can implement that, so we can track of all the messages and if they haven't seen it, then sent the email / sms notification based on user preference?
I just want to know how we can do that with firebase. if it was just php and mysql. it was really easy to do this.
Not sure if this can be done efficiently in Firebase. You will have to setup a cron job to fetch the messages which are not seen and trigger SMS/Email fallback.
I would recommend using Applozic (https://www.applozic.com) for Chat related stuff and Firebase for storing user meta data and other data.
Applozic provides a single click configuration to enable Webhook/SMS/Email fallback, along with that you will get all the whatsapp like chat features along with full UI with no need to write any additional code.
I am trying to incorporate GCM push notifs to my app. I was reading a tutorial but unfortunately it uses REST api and slim framework and I don't have an idea on those and it will be time consuming for me to study about those. What I am thinking right now is to just SIMPLY assign each user in the database with a gcm registration id and send them a notification. But the problem is I don't know how to get gcm registration id in the simplest way. I have less knowledge when it comes to PHP or server side. Can someone help me or just give me a link tutorial using simple implementations? I would really appreciate it.
By the way, the purpose of my push notif goes like this: On a specific period of time, let's say on a specific date, there will be a list of app users that are qualified for a contest. Those users should receive a notification on their phone once they are connected to the internet.
I'm trying to implement push notification but I'm a little bit lost.
I just want to have a button in php and when I click it, a notification appear in all devices telling the users something like: "A new image is available in the web".
I read the GCM documentation but I'm not sure how to start.
I see that in some examples the users have to send their emails in order to register their "sender id"? it is necessary? I want the user don't have to register anywhere.
Can someone help me to start or give me a quick tutorial?
Thank's for all.
You will need to use curl to call the GCM, you can find examples like this all over SO, for example : how to send a notification to millions of android devices in php using GCM (first one that came up in a search)
And of course you will need the registration id's otherwise GCM doesznt know which device to send the notification to.
The solution is not so simple. You should at least use some package dedicated to this specific service. Also, you should read something about what push notifications are.
There are many services out there you can use to interface yourself with this specific kind of service.
Take a look to this service to get a first idea about the entire mechanism. Remember that you have to subscribe to a push service provider for every platform you want to use. For example the Apple Push Notification Service, or Cloud Messaging by Google.
Hope it's a good start for you.
I am following this tutorial from androidhive. http://www.androidhive.info/2012/10/android-push-notifications-using-google-cloud-messaging-gcm-php-and-mysql/
Everything is working But The tutorial only shows how to send a push to ONE device at a time. I would like to send a push notification to all devices at once using the same method. I believe the way to do this is by editing the send_message.php But i'm still trying to understand how his method works.
I have tried commenting and emailing the person who wrote the article but have not gotten a response. I just need someone to point me in the right direction.
Any hints, guildance, answers, comments are much appreciated.
Now that you have successfully implemented what that tutorial teaches, the basis idea now for sending to multiple users will be something like this:
To send push notification to multiple users, you need to create an application server in PHP.Your application server will receive the registration id from the android application and will store it in a database (may be mysql).
Now when you want to send the message to the application then you write a message and fetch all the registration ids from the database which was stored earlier.
You can follow this useful tutorial to achieve exactly what you want.
The tutorial which you have mentioned was made using GCMRegistrar which is deprecated now.Instead you need to use GoogleCloudMessaging API.The link which i provided uses the new way.Hope this helps you to implement what you want.