I am currently working on an android app for a client and it needs to use push notifications from parse.com. I have been able to send notifications from the emulator and also receive messages from the server when someone sends a message from there but I want to do it in such a way such that the server automatically sends me a notification depending on a condition. Is it possible and if yes, could someone direct as to how to do it.
Your client would need to notice the condition and send the message.
What event did you trigger a notification from?
Yoou can use Parse Cloud Code. If you have your XML parsing code in a 3rd party server, make an external call to the 3d party server through REST from Parse Cloud Code. Inside your Parse Cloud Code you can check the date attribute changes, and if your condition is met, you can send push notification from the Parse Cloud Code. So your android application should communicate only with the Parse Cloud Code and let the cloud code talk to your 3rd party server.
Related
As the title says, I want to send a push-notification to my android phone via a form on my website. I've googled but didn't found the right answer to my question.
Maybe someone can give me an idea to do that or what I need for that.
You can use Parse javascript(JS) API to trigger the push notification from cloud. In other words, you can write a cloud function that queries the Installation table and sends push notification. This cloud can be triggered via Parse JS API. Another way, you can use third party of Parse API extension like Parse4j. You can implement your web site server side in java and via Parse4j you can trigger cloud function when the form is submitted and controlled. Hope this helps.
Regards.
I am creating a simple forum app for ANDROID using Parse. I am stuck at a problem related to notifications
For instance I want that when user A posts a comment in a forum app, user B (who subscribed to that post) will receive a push notification, can I do that using either client code, instead of handling it using Cloud Code, or the REST API? If not then how to I start developing the server side to use cloud code or REST API
Allowing users to send push notifications via the client is bad for security reasons. It's not incredibly difficult to get the application id and client key to an app. Anyone with that information will be able to create their own code that allows them to target whoever they want with push notifications if client push is enabled.
I am buiding an android app which will be receiving notifications from my server. This means all my users which is above 1 million, will receive notifications from my server. I know parse and google cloud messaging(GCM) can do the push messages but please I want to know the best out of this two (parse and GCM) so I can implement it. Thanks in advance.
If you look at https://parse.com/tutorials/android-push-notifications you can see:
The Parse library provides push notifications by using Google Cloud Messaging (GCM).
So you have to register your app to GCM console to send push notification in anyway.
When to NOT use parse.com?
If you already have a backend service, you can easily implement push notification since there are plenty of third part libraries for different platforms such as node.js, php etc.
When to use parse.com?
If you don't have backend-service and you just want to send push notifications also if you don't want to spend your time by setting up server stuff then you can go with parse.com
NOTE: Facebook shuts down parse by January 2017 so please consider it.(http://blog.parse.com/announcements/moving-on/)
Android push notification is a service used to send messages directly to the Android Mobile Devices.
There are several ways we can implement Android push notification.
Google Cloud Messaging(GCM)
Parse Notification(Parse.com)
You are asking which one is the best way to implement :
The standard way is using GCM (Google Cloud Messaging) but there are some alternatives like Parse Notification,Which is easier to use.
If you need to handle Json Push messages,Refer this link
Steps involved in send Push notifications:
Developing the application involves two parts:
GCM Server Application – Create Web application using Php to send message to User via GCM Cloud server
GCM Client Application – Create Android application which receive message sent from GCM Server Web App
For More Informations regarding to GCM server and Client Application
Parse uses GCM and uses own service for Kindle
Please Go with google cloud messaging(GCM) .It is very easy to integrate in android app. the problem with parse in some case device token or registration id is not register at their database so User of parse does not get push notification.In case of GCM we can sure for device token
So my recommendation is GCM
Hope this will help you.
I want to send notification from PHP application and same time it should be received by android application. I have no idea about it. I just know i do not want to use thread to be schedule for seconds and call url but get activate when notification sends from PHP server.
You required to use Android Cloud to Device Messaging C2DM API of Android,
Please find a useful example from here.
I would like to make app in android in which i wand to send some message to server and also want to get notification from server if there is any updates via C2DM in android.
How to send message to the third party server. (Third-party server like php)and inputs are necessary to send message to the third-party server. and how to send response Third-party server to C2DM and get notification from C2DM to Android device?
Well that's like asking "How do I write an Android application?" and expect to get a full answer.
I suggest you start with reading this:
http://code.google.com/intl/sv-SE/android/c2dm/index.html
Then download the Chrome To Phone source code see how they implement the C2DM solution. It is fairly complicated but if you know how to make http POSTs from your Android application and your server you will succeed.