从服务器到Android的通知 [英] Notification from Server to Android

查看:125
本文介绍了从服务器到Android的通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



如果服务器的状态发生变化,将如何通知android模拟器或设备..

ie如果我在数据库中插入新记录,那么android设备将收到新记录添加!!的通知



我正在考虑遵循观察者模式但还有其他方法可以摆脱这个问题!!



不要问代码或者你到目前为止尝试了什么,因为它''我的盲目假设,我必须尽快实施!



谢谢!!

hello all,

how android emulator or device would be notified, if server''s state got changed..
i.e. If I am inserting a new record in Database at that time android device will get notification that "New Record Added !!"

I''m thinking about following Observer Pattern but is there any other way around to get rid of this problem !!

Don''t ask for code or what have you tried so far, because It''s my blind assumption and I shall have to implement it ASAP !!

Thanks !!

推荐答案

嗨Krunal,



你会很高兴知道,从Android 2.2开始,可以将信息推送到Android应用程序。此服务称为云到设备消息或短C2DM。您可以在此处找到详细的教程。



请注意我还没有尝试过,但这绝对值得一试。



问候,
Hi Krunal,

You will glad to know that As of Android 2.2 it is possible to push information to an Android app. This service is called Cloud to Device messaging or short C2DM. You can find a detailed tutorial here.

Please note that I have not tried this yet, but it''s definitely worth a try.

regards,


这篇关于从服务器到Android的通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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