获取Android通知时,有MYSQL中的任何更新。 [英] Get Notification in android when there is any update in MYSQL.

查看:239
本文介绍了获取Android通知时,有MYSQL中的任何更新。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想基于MySQL的改变来实现通知。我有一个应用程序发送这就是任务的设备上运行。我想,我得到我的Andr​​oid设备上的通知时,我插入工作表中MYSQL的任务。
我可以使用PHP从MySQL获得的每一项工作。而我也做出登录中,我得到的用户名和密码,从MySQL验证。和同样喜欢,我已经做了任务。获得任务。
像<一个href=\"http://stackoverflow.com/questions/13245771/how-to-validate-the-user-login-credentials-in-android-using-php-mysql-with-the/13248082#13248082\">this现在我下面这个教程以落实通知。但如何能够在插入MySQL的任务时,我得到通知。我不得不做出这样将在后台运行的服务,但我将如何得到,如果有anychange的任务表。 ?

I want to implement Notifications based on changing in mysql. i have an app thats send tasks to device on runtime. I want that i get notification on my android device when i insert a task in Task table in MYSQL. I can get every task from mySQL using php. and i have also make login in which i get username and password and verify it from mYSQL. and same like that i have did for task. to get tasks. like this and now i am following this tutorial for implement notification. but how can i get notification when inserting task in mySQL. i have to make an service that will run in background but how will i get if there is anychange in task table. ?

推荐答案

您可以在你的MySQL数据库中创建触发器并运行一个外部应用程序每次一个行将被插入该表。更多信息: HTTP: //dev.mysql.com/doc/refman/5.1/en/faqs-triggers.html#qandaitem-B-5-1-10

You can create a trigger in your MySQL database and run an external application everytime a row is inserted in that table. More info: http://dev.mysql.com/doc/refman/5.1/en/faqs-triggers.html#qandaitem-B-5-1-10

这篇关于获取Android通知时,有MYSQL中的任何更新。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆