Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have a SQL Server database and when there is insert in a table I want to notify the Android app.

For example, when order receives, I insert it into a SQL Server database. I also want user to get notification in my app about the order. The app is always open. I use web services to contact with database.

I don't want to request the table every 10 seconds or so. Is there any other way?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
461 views
Welcome To Ask or Share your Answers For Others

1 Answer

You can use Google Cloud messaging service, see how to set server here.

Example: if you are using PHP then while inserting or changing any data you can push to notify GCM to the given dives. or else you can set triggers in SQL and call system services to notify GCM.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...