i just need to get some information about a solution i'm trying to implement.I have to write a push service that can be used to push messages to android and ios apps the project is an ionic app.
So far i have come across Google Cloud Messaging ,Firebase ,Pusher ,push.ionic.io but all of them are third party.
Is there any documentation that explain how to make such a push service using php.I have previously worked using rachet for websocket.As i understand this type of service must be based on websocket.
There are various resources available out there regarding implementation of Push Notification services in php. Let me point you to couple of those.
Simple Push service in php
Have a look at this.
So if your concern is implememnting Push noification on client side using ionic. You can use ngCordova's cordovaPush. You can find it here.
cordovaPush really works great both for android and iOS.
Related
I want to make an App with push notifications, which will not stop in Android phone, exactly like in WhatsApp.
I can easily make a php API for notification on my xyz web hosting to send push notifications to my application.
But I don't know which methodology to use. I am a beginner in Android App development. I want to make the App using Android Studio.
I appreciated if you could share any example source code.
In this case using google fire base is a good choice.search about it.
I'm new to android and php, I've been watching tutorials and implementing it. I'm making an app in which i want to send push notifications, I've come across many tutorials but some of them were only implemented on a single device where in my case i want to send it to all my app users(students who will be using my app). If there's any way to deliver messages via notification, I've made an app and in Live section, I want to send push notification inside an activity. How do i do it?
I've integrated firebase in my app but it doesn't support multiline messsage's. I'm fairly new to php, If there's any tutorial I could implement please suggest.
You can use Google Cloud Messaging as well as Fire base Cloud messaging
i am sure to help you this link for multiple devices
Google Cloud Messaging
http://www.androidhive.info/2012/10/android-push-notifications-using-google-cloud-messaging-gcm-php-and-mysql/
Firebase Cloud Messaging
http://www.androidhive.info/2016/06/android-firebase-integrate-analytics/
I tried searching these issues. Some sites say I need to do some stuff with php in order to make 3rd party server while others don't mention anything. some says it need JSON. Guide me please. PS I am a beginner and know java, XML,SQL only.
You should only need one server. The second server you are reading about may be the Google GCM cloud server? When I did a GCM project a few years ago, I had one server, it happened to be a App Engine instance. It generated events and sent them to Google via the GCM api and then onto onto the device. I don't remember it being that difficult.
I did have more than one server in the mix though, there were others that sent messages to the AppEngine server, but it was not required to send a GCM message.
Google Cloud Messaging (GCM) is a service that enables developers to send data from servers to both Android applications or Chrome apps and extensions.
So if you want to send data to the users of your App then you must have an interface or dashboard from where you can send some data (typically push notification) to the users of your app.
This dashboard (server from which you can send data) can be developed by using PHP or any script languages.
Now a though can come up in your mind:
"I am suppose to develop both the mobile app and the server then what
role does GCM play?"
Yes, GCM is playing a vital role indeed. The server we have to develop is just to design an interface so that you can type your message/notification and select the recipients. Rest of the part of (managing the queue, communication with the apps checking for authentication and all other stuffs will be done by mighty GCM )
In order to have an bird-eye overview you can take a look on this image collected form android hive
Server side coding is doesn't need you to be expert in php. So you can go through to this article. It helped me a lot to learn.
I have built an ecommerce website in CakePHP and MySQL which takes orders and stores them in db. I've been told that I need to create a web service for sending notification to desktop/via email which would alert us of any order given instantly and would also provide us with order details. Do i need to study up on web services, SOAP, GET POST etc. or can I do it with some easier method? What would be a secure and fast response way of receiving such a notification from the web application? Thanks in advance :)
A webservice would be useful the other way round. If a third-party entity wishes to access your website as a service without accessing HTML pages, yes in that case, creating a webservice on your end will be useful.
I recommend you for instance to see the RESTful webservice interface to stackoverflow/stackexchange itself to understand this concept: https://api.stackexchange.com/docs.
In your case, I can't see how webservices would be involved. If you just need to send emails from your website, it can be done directly with the PHP mail() function, or using a mailer like PHPMailer.
Desktop notifications are an entirely different matter, because you need a client software.
I haven't dug pretty far in that topic myself, but here are a few pointers:
A popular Desktop Notification software for MacOSX is Growl which has been unofficially ported to Windows: http://www.growlforwindows.com/gfw/
There is a PHP API to send messages to Growl clients: http://clickontyler.com/php-growl/.
How can I use a php script to push to an iphone or android phone?
What I am thinking right now is to have a php script that will run every 15 minutes on a web server, check if case x is satisfied, if not push a notification to the phone.
How can this be accomplished if its even possible? If not what approach should I take to achieving this? Any links or break downs would be greatly appreciated.
Instead of reinventing the wheel, how about using an existing tool such as Urban Airship? They provide a PHP library as well as a super-simple example using PHP's libcurl.
If you want to send the notifications yourself, you'll need to read up on sending push notifications to each platform. This SO question (and answer) address sending notifications on Android. This article is one of many in addition to Apple's docs that explain the process for iOS. If you use a third party service like Urban Airship, you'll need to look at that API instead.
If you want to setup your own server for push notifications, you should take a look at Easy APNS. It's a PHP library for push notifications which is very easy to set up and customize.
Android Cloud to Device Messaging Framework is used to push notifications to Android devices. You can develop server part yourself or use existing service such as Urbanairship. It allows you to send pushes to both Android and iPhone but you'll have to pay for it.