captainblack
captainblack

Reputation: 1033

How to listen mysql database changes in Android

I have an android application and I use a mysql database. I'm connecting to db via my PHP script. I want to make a listener for mysql database. It will listen updating and inserting events on mysql db and I will be informed. How can I carry out this event on Android?

Upvotes: 2

Views: 1221

Answers (1)

user5812699
user5812699

Reputation:

you will have a Updates table that holds the primary key of the table that you want to observe, and a trigger which listens for updates on table you like and enters the id of that updated entry to the Updates table.

you will have a RESTful webservice which will query the Updates table and will provide the change.

and on android all you need to do is connect that webservice via basic GET request by the help of 'Volley' i guess.

thats the scenario that came to my mind when i read your question.

Upvotes: 1

Related Questions