0

I am using SQL Server in my Android app, and I want to send notification to the user whenever there is new message to his account, so is there a way I can get notified when a new row is inserted.

I saw people recommended triggers, but I don't how they are going to help me.

Ryan M
  • 18,333
  • 31
  • 67
  • 74
  • Either way you have to poll the database for changes. You can either poll the message table, or you can use a trigger to add an event to a queue and then poll the event queue. There is no magic way to detect and notify of change. – Dale K Mar 02 '21 at 19:19
  • 3
    BTW we don't do "urgent" on this site. Pay a consultant if you have time restrictions. – Dale K Mar 02 '21 at 19:24
  • 1
    Does this answer your question? [Get notified when database change Android](https://stackoverflow.com/questions/22242438/get-notified-when-database-change-android) – SMor Mar 02 '21 at 20:31
  • @Dale k , do you have a reference for that – Samiira Mohamed Mar 03 '21 at 16:27
  • @SamiiraMohamed a reference for what? – Dale K Mar 03 '21 at 18:52

0 Answers0