[英]send notification to specific android device by my website
是在Android中推送通知和服务的新功能。 我想通过自己的网站发送请求,我希望在我的android设备上运行的服务应读取此请求。 有什么办法可以做到这一点。
任何帮助将非常感激。
谢谢 :)
您将必须使用GCM来具有推送通知请参阅: Android“ hello world” pushnotification示例
这可能也有帮助: http : //quickblox.com/developers/SimpleSample-messages_users-android
不知道我是否完全理解您的意思。 如果您想使用android向网站发送请求,则可以使用Apache的DefaultHttpClient。
这是一个例子:
DefaultHttpClient httpclient = new DefaultHttpClient();
HttpGet httpget = new HttpGet("http://www.nasa.gov/rss/dyn/image_of_the_day.rss");
HttpResponse response = httpclient.execute(httpget);
上面的代码是从NASA网站对image_of_the_dat.rss文件的Get请求。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.