How to use websockets and push notifications at same time - php

I currently run an app in php zend framework that contains a real chat using node.js and socket.io, the chat is working really good, but i need to create a service to send push notifications using the pushwoosh technology, is there any way to send the push messages in the node.js server? or i have mandatorily to create a service in zend framework, considerating that chat is running in an mobile app too, and the messages should arrive even when the app is closed.
thanks for your help.

Sending push notifications on mobile devices cannot be done stand-alone and you must take in consideration that you have to rely on third-party services.
The concept is that you don't directly send push notification to your application, but you send the request to a third party service asking to send the push notification to your registered application.
For example, these are the steps you will go through to send a push notification to an IOS application:
An app enables push notifications. The user has to confirm that he wishes to receive these notifications.
The app receives a “device token”. You can think of the device token as the address that push notifications will be sent to.
The app sends the device token to your server.
When something of interest to your app happens, the server sends a push notification to the Apple Push Notification Service, or APNS for short.
APNS sends the push notification to the user’s device.
(reference: http://www.raywenderlich.com/32960/apple-push-notification-services-in-ios-6-tutorial-part-1)
So it's not as easy as you wish to. You won't directly send the push notification, but you will ask to apple in case of IOS or to Google's server in case of android to send it.
In most case, you will have to register as developer on their dev centers and get all the tokens and certification they ask.

Related

Send FCM message to specific Google user without need to install an app?

I'm doing a tiny personal project involving an Arduino and a PHP backend. I want to send a push notification from the PHP backend to my Android phone using Firebase Cloud Messaging. This question is specifically about FCM - I don't want to use any other services like Blynk, etc. I also do not want to send the notification directly from the Arduino, but rather from the PHP backend.
Can I send a FCM notification to my phone without having to create an app to receive it? I'm logged in with a Google/Gmail account on the phone, and I have no need to target any other users than myself.
Can I send a FCM notification to my phone without having to create an app to receive it?
No, this is not possible. It would open users up to some pretty hefty abuse.
In order to receive your notifications, the user must have your app installed.
Mind you, this can be a pretty minimal app, since the default implementation of FCM already displays notifications to the user if the app is not active. So really all you have to do is create an empty app that includes the Firebase Cloud Messaging SDK.

Firebase Cloud Messaging API

We are using Firebase Cloud Messaging for iOS and Android. Just wondering if its possible to create a web application that has a form whereby we can send push notifications to both platforms at once - assume we know the topics to send to. (maybe using POST/cURL requests)
yes you can send the push notification in some of the web browsers using firebase integrations (web push notifications)
please go through the following link
https://developers.google.com/web/fundamentals/push-notifications/
https://www.w3.org/TR/push-api/
https://firebase.google.com/docs/cloud-messaging/js/client

IBM Bluemix push notification through PHP code

I am new with IBM Bluemix and I want to add PHP code for sending push notifications on both iOS and Android devices.
My app is built with the Xamarin platform for both type of mobile devices.
The backend is created in PHP with the Codeigneter framework.
I see in the Dashboard there is direct user interface for sending a push in Bluemix, but I want to send a Push on run-time for example: some user sending a friend request and the other user automatically receiving a push notification.
There is not a PHP SDK library, but you could accomplish your behavior by checking out the Push Notifications Swagger documentation:
https://mobile.ng.bluemix.net/imfpushrestapidocs/
First you would register your mobile app so it receives push notifications (using the Android or iOS Client SDKs available here). Then you could have your backend send the push notification to a specific device on the event that a friend request is sent by using the REST API (as outlined in the Swagger docs).

Identifying event of Imap/smtp after what I can fire push notification?

I have configured exim-dovecot-***webclient on cent-os for setting up an email application, wrote some web services in php for my mobile application need and now working on mobile application that will receive push notifications from server. I want to trigger/broadcast push notification to mobile application when email arrives. Although, I know all the procedure for sending a push notification to mobile device but unable to find the event/flag after what I can fire the notification.

send notification to android device from server without GCM(Google Cloud Messaging)

I have to send notification from server to android device. I developed application which got notification from server by using GCM (Google Cloud Messaging). But as I already have server then why to use GCM. I am not getting the purpose of using GCM. Can we send notification from server to android application without using GCM.
General Communication Pattern :
Device --> HTTPRequest -- >Server , Server -->HTTPResponse --> Device
But in this case, the device gets a response only when you send a request from your device to the server. Hence, whenever you need something new from your server you need to make a
request.
Using GCM, you do not need to make this request explicitly to your server. You'll automatically be notified when something new happens (depending on your implementation).
You are having server but GCM is totally different thing then your server.
GCM will monitor Your Application server that any changes made or not ??
And if anything created then it will send you notification without refresh or reload the Application.
and GCM will send you notification when your application is not working as well

Categories