Update app when server update android - android

I created android app that connects with MySql in phpAdmin by Json code and the app works well with me. I want when the admin add a new row in the table that in server, the app knows that the new data added, meaning that I want the app updated with sever forever.
How to do this?
Thanks in advance.

Schedule a request to the server every once in a while or let have a REFRESH button in your app. For the request to the server use an AsyncTask and s
Inside onPostExecute update your UI.
Check the AyncTask docs here

Its better to use GCM (Google Cloud Messaging) for Android and Push Notifications when ever you update your Mysql data, so that your app can connect to your server and download refreshed data accordingly, Saves Battery and improves your app performance.
Tutorial Here: http://javapapers.com/android/google-cloud-messaging-gcm-for-android-and-push-notifications/

Related

How to create customize app telegram using API?

I want to build an app that continues an only one group maybe with API.
Someone can guide me with this, please?
It's for an Educational app.
One option you have is to work with a server.
On your server, you host a database and an API. You can use the database to save the users and the messages. You should also send your push notifications with this server. You can send push using FCM, but I personally had some problems with it and switched to OneSignal.
In your APP you can show the different messages using a ListView with custom list items. To communicate between server and app you can use a Volley request.
Some time ago I wrote nearly the same app. I would recommend you to use a server with an API (a simple PHP API is enough).

In Android, sending notifications to android phones via code in Firebase

I am developing an application that saves some data in the Firebase Database. As soon as the data is saved, I want it to be given as a notification to all the users connected to the application through code.
I couldn't understand the procedure to do so. Can anyone explain me how one can send push notifications via code in the chain as Android phone -> Firebase Database -> Notification to Android Phone with the data.
it isn't Possible to solve your Problem with Firebase only. You have to create a MySQL Server and work with PHP. Maybe this Video from Filip Vujovic could help you.
https://www.youtube.com/watch?v=LiKCEa5_Cs8
You can use GCM,it's simple.The GCM service handles all aspects of queueing of messages and delivery to client applications running on target devices, and it is completely free.

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.

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

android, automatic push update data for apps

I want to push new data to the apps on user's device after a couple of days, like news update service. It's NOT APK update. Where do I get some clues to start with? tks in advance
(sorry if this question is dumb, but why can't I search for it on stackoverflow, I must miss something?).
You can accomplish this in many different ways. One option is to design your app to periodically query a server-side REST API and download new information in an JSON/XML format. That information can be stored in a local SQLite or flat file database on the device. You could also integrate with Google's Cloud Messaging service to send push notifications to the device. When your application receives a push message it could spawn a new background process to download any updated content from your server.
You can use push notification (search for c2dm) which will notify users whenever, content/data is updated on server. Whenever, android application will receive push message from server, it will update the local database (say, news database in your case) from server.
Hope it is helpful information for you.
Just upload the new app, with the same key that you used it previously and also increment the version code.

Categories

Resources