How do I receive a notification on android whenever there is a record in a table?

1

I have a problem, I have an android project that I need to receive a notification on my phone whenever there is a new client in the database (in the background too!). but the problem is that I can not find a way to tell when there is a change in the database!

I'm using an external MYSQL database and pulling the information via json directly into a listview (if you want to put the code here.)

Would anyone have an idea how I can be notified on my phone when there is a new client in the database?

    
asked by anonymous 20.07.2015 / 01:44

1 answer

2

You can use push notifications (GCM for Android).

First study GCM .

The moment you add a new record to the database, trigger a push notification push request to the GCM server. This can be done via a trigger in the bank or some other way.

When push reaches the mobile, ask the server for the new data.

    
20.07.2015 / 02:08