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.
Related
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 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.
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.
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.
I need to implement push/C2DM notifications on my website, I installed the Android 3.0 platform sdk, simulator, and I installed the application from an .apk file.
Now, I'm using a ZF powered sites and I want to test my notification, is it possible through the simulator?
I didn't write the actual Android Application, and I'm not able to do anything on it, but what should I know to use it with PHP?
Thank you
You cannot push C2DM messages to third-party applications - not without their active participation. Google's technical implementation explicitly forbids that.
An app specifies a Google account it wishes to receive notifications from; in order to send notifications, you need to log on with a Google account. For everything to work, the account has to be the same. So unless you know what account does the app wants messages from, and you know the password to that account, no C2DM for you.