[英]How to send notifications from an Android Phone to a website?
I am currently working on my project like Parental control. 我目前正在从事像“家长控制”这样的项目。 I am trying to find a way , that if there is any procedure or way to send a notification from an android phone to a website whenever the android phone sends/receives an SMS and dials/receives a call.
我正在尝试找到一种方法,即每当Android手机发送/接收短信并拨打/接听电话时,是否有任何程序或方法将通知从Android手机发送到网站。 On website , a database will be maintained for these notifications.
在网站上,将为这些通知维护数据库。
I think you want to maintain database, based on mobile even. 我认为您甚至想维护基于移动设备的数据库。 You can create API call, that will send data to database while any activity happened on mobile.
您可以创建API调用,该调用将在移动设备上发生任何活动时将数据发送到数据库。 That api will store notification on DB.
该api将在DB上存储通知。
On web you can create AJAX call that will check in DB, if any new notification come or not, if new record found you can show it on website. 在网络上,您可以创建AJAX呼叫,该呼叫将在数据库中签入,无论是否有新通知,如果发现新记录,您都可以在网站上显示它。
This is what I think the best way to do so... 我认为这是最好的方法...
You could send a get request or post request to a website. 您可以向网站发送获取请求或发布请求。
Sending POST data in Android 在Android中发送POST数据
Android - Sending HTTPS Get Request Android-发送HTTPS获取请求
Just some examples. 只是一些例子。 You will probably be looking for a restful api.
您可能正在寻找一个宁静的api。 I haven't read this, but it looks viable:
我还没看过,但是看起来可行:
http://www.9lessons.info/2012/05/create-restful-services-api-in-php.html http://www.9lessons.info/2012/05/create-restful-services-api-in-php.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.