A long time ago I've been reading and watching tutorials about Android, reading about Push Notifications and GCM, but I don't understand.
I have a Order's table in my SQL Server database and an Android application. On every order status update, the application must be notified.
But I don't understand how it works.
I've created an app by GCM in the developers.google, I've got the key, id, etc, but how do I do this integration?
Should I change my database? Should I create a ASP.NET system for notifications when I update my database?
I've tried the Azure push, but it provides a JavaScript or asp.net code. Why this one? Can anyone explain this to me?
I've implemented many codes from tutorials and internet, but there's no SQL Server and Android tutorial. I searched here, someone talked about using trigger, but I don't know how to integrate this.
You need to write a web service to sit in between the application and the database
You can find some information on web services Here
The database doesn't actually matter.
In order to achieve your goals, you need:
Regiester the user's device to GCM, and get his token.
Know when you need to send the Push.
Send a request to GCM in order to send the push to the device.
You can use any techonology you want, and if you use .NET, you might want to try PushSharp
Related
I'm new to Android and want some advice please.
I need to build two Android applications.
Android application for train travelers
Purpose: Sending a custom message (for assistence) to the railway guard. The railway guard will be identified on the basis of the wagon number that has been sent.
Android application for train guards.
Guard must be able to login and be able to receive (realtime) messages from travelers.
In short, this should be a one-way messaging system.
I'm used to build RESTful web application with databases. I have no idea which technologies i should use in this situation. As far i know i can't use databases such as MySQL, Oracle on Android. I've read that Firebase is an alternative for this but i'm not sure if it's the ideal solution for this kind of application.
I could build a RESTful server and make calls from the application. I guess if i do so the messages won't be received as realtime push notifications.
Any advice please?
RESTful services are hosted on a server and cater to incoming requests with a response.
Remote notifications are handled by a remote server. Under this
scenario, the client application needs to be registered on the server
with a unique key (e.g., a UUID). The server then fires the message
against the unique key to deliver the message to the client
application via an agreed client/server protocol such as HTTP or XMPP
and the client displays the message received. When the push
notification arrives, it can transmit short notifications and
messages, set badges on application icons or play alert sounds to
attract user's attention.[21] Push notifications are usually used by
applications to bring information to users' attention.
Source of above text
You can understand the basics and implement it into your application.
However, it is too much work and you really won't be gaining much.
It is much better to use Firebase and the documentation is quite good.
You need to pay as you go based on how much you are using Firebase.
A place to start:
https://firebase.google.com/docs/cloud-messaging/
I need to work with android push notifications. I have an app that works with a local database. When this DB is modified i want to send a notification to many concrete person.
I was looking at GCM and Firebase. But i dont know if those ways permit me to do this.
I dont understand good the firebase documentation. If my server side is develope in android and my client side is also in android. I only need to register in FCM service the client side project and then i use the API key that FCM provides me, in the server side with de userID to send notifications?
I know how to implement GCM in my App but I don't know how to build a server able to send notification to ALL the users.
I need something quite simple (just sending notification), could you advise me any services and tutorial in order to set up the server?
I wish something not to complex, because everything that I will need from my app is receiving whether simply notifications to display or to tell the app that some new data is available for downloading.
Thank you!!
Prerequisite for GCM Application
Google API Server Key
GCM RegId of the Android Device to communicate via GCM
If you get clear concept about GCM, please visit here
If you want to use java for server side then visit my answer.
Related Links:
Android Push Notifications using Google Cloud Messaging (GCM), PHP and MySQL
Android Warriors
If you're using PHP, you could use this approach to send GCM message to your client refer this
You could setup your own local server on PHP using AMPP. refer this
Probably, the simplest way is to add a cloud endpoint module refer this. Then, write a simple service refer this that sends the messages. Finally, let Android Studio deploy it.
I am a newbie in android. I have developed few applications, but all are plain and simple, just used the built in features of android.
I was asked about push notifications, in one of my interviews and I decided to have a look at what Push Notifications are. I understand the concept of Push Notifications(I think), but whenever I read the term "Server", it's freaking me out.
I understand all the client side coding, but I don't get how to implement the server side coding. I have seen some people use XMPP, MQTT, etc., What are those? Here is my scenario and what I want to know..
Scenario ::: Let's say I have a website, with a table (the values are retrieved from database), where I update a few columns every day. I want these updates to be reflected in my android application. So, as I have read, push notifications can tell the application that there are updates available. Good. I am fine till here..
When the application gets the notification, should my application, contact the website and get the latest information? or will the updated information sent through Push Notification? I guess, my application would be contacting the website and get the information. Now, how do I get the data from the website? Should I get the source of the page and do some kind of parsing or something?
I will be asking more questions, as the experts clear my questions...
Sorry, if my questions are too naive, but this is the only place that can help me...
Push Notifications means Google Cloud Messaging for Android (GCM) is a service that allows you to send data from your server to your users' Android-powered device.
You can refer to this documentation
Google Cloud Messaging for Android
GCM: Getting Started
And there is also Demo App Tutorial given
in your case you need to create HTTP web service for getting data from the server.so when you get notification about update on server side.you just need to call this web service and get the data you need to update
I have web service Java(Netbeans), MySql and 2 android application.
I need when database is updated send any message (notification) to application who can help me.
Who can help me or show me some tutorial.
You need Google Cloud Messaging. This is probably the most easy out of the box solution for notifications.
Following keywords can help you further. To notify your web service from the database you could use Query notification or just poll your database.
If GCM is not suitable for you, you could implement a technique called long-polling.