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

Asked

Viewed 800 times

1

I’m having a problem, I have an android project that I need to receive a notification on mobile whenever there is a new client in the database (in the background too!). but the problem is I can’t find a way to know when there’s a change in the database!

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

someone would have an idea of how I can be notified on mobile when there is a new customer in the database ??

1 answer

2


You can use push Notifications (GCM in the case of Android).

First of all study the GCM.

The moment you add a new entry to the bank, fire a request to send push notification to the GCM server. This can be done via a Trigger in the bank or otherwise.

When the push get to the phone, ask the server for the new data.

  • thanks for the idea, I’ll take a look !

  • Ok. If the answer meets your need, do so to accept it: http://i.stack.Imgur.com/uqJeW.png

Browser other questions tagged

You are not signed in. Login or sign up in order to post.