how can send message to my android app from web service - android

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.

Related

How to send a notification when Firebase database has been updated?

The latest launch of Firebase notifications feature allows to manually give the time and content of notification. Is it possible to automate it so that notification is received every time a particular variable is changed in the Firebase database?
Thanks for the reply Hamid. I didn't want to get into the technicalities of GCM therefore I implemented the notifications using a service. This service listen on the Firebase database and sends a notification whenever new data is added there.
I think you would have to setup a GCM (Switched to FCM now) server that handles all that. But I also do wish that there was a simple way of setting that up without needing to build a full server.
There is a friendlyping application that helped me set the XPMM server.
I think the current Firebase Notifications are very much in its early days. It doesn't provide many of the functionalities of Batch.com or Parse Server... yet.

How can I integrate SQL Server and my android application with Push

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

Android Notification through PHP MySql

I want to implement notification of news or article in Android.User can put the new article or news on the server after that i want to show notification in my app through PHP MySql.Can someone help me how to do this.Thanks to appreciate.
PHP is a server side process - it only runs when a user/app/service requests the page.
MySQL is a server based database. It's not "connected" to your app.
Your app must then "poll" your website (it has to request data from it periodically). This is best done using an XMPP type service. You can find a lot of info on XMPP - basically, it's complicated to setup and run. It probably isn't worth doing unless you've already done it.
Alternatively, you can use an existing XMPP service. Google Cloud Messaging (GCM) is an excellent option for most Android devices (any that has Google Play installed... so, it won't work on an Amazon Fire phone, for example). It's not "easy" to setup, but they do a lot of really hard stuff for you. Also, there are a lot of references for setting it up, like this from Google:
https://developer.android.com/google/gcm/client.html
You can use Google cloud messaging to display Notification or You need to create a service that always ping your server for new message.
please try 1st options its better.(2nd options is worst because it use more battery & internet data )
You can use google cloude messaging service to send notificaion in device so please register your application on google service all step are cover below link.
Open below link and follow step
http://www.androidhive.info/2012/10/android-push-notifications-using-google-cloud-messaging-gcm-php-and-mysql/
You can use GCM (Push notification) and implement the notification generated method inside onMessage method.
For reference use this linkAndroid Push Notifications using Google Cloud Messaging (GCM), PHP and MySQL
What you are looking is Google cloud messaging.
For Gcm you have to write a server in your case is php server.
For Gcm server code or for testing purpose refer this link.
Android: Test Push Notification online (Google Cloud Messaging)
But firstly it is best to learn about GCM itself and it's mechanism.
For this you can refer this link.
https://developer.android.com/google/gcm/index.html
You have to do some settings in Google console which are all explained in this article including the android side code.
Hop i helped you.

PushNotifications - How to Implement

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

how to get notification from another server in Android

I am getting data from the server, and I want to show a push notification in android. How can I do this?
Be clear to yourself What do you exactly want, I think you are using just a web service to get data. For push Notifiaction you need to implement Android Cloud to Device Messaging and here you can find complete tutorial.
Cheers

Categories

Resources