English 中文(简体)
我如何发出通知?
原标题:How can I send a notification?

I am developing an Android App that communicates with a server. How can I send a notification from my server to my Android App without the use of C2DM? Are Sockets a good solution? What are other alternatives?

问题回答

我建议你开发一个网络服务,最好与JSON一起操作。 这一服务器客户结构将使你失去发送和接收任何类型的数据(从原始文本到图像或甚至录像)。

查阅C#网络服务。 这比PHP服务IMHO容易启动。

Depends on what you want to do.

您是否考虑了服务器如何确定客户发出信息? 在这种情况下, and电话?

With http you would need the client to "request" this notification.

实际通知的最近一点是,要有一个用户与服务器连接的袖珍连接。 但是,这将需要两者之间存在联系。 如果你真想避免C2DM,那么,如果你真的想要这样做的话,就会走下去。

但是,使用C2DM使服务器能够向设备发出通知,而无需客户要求或直接联系。 唯一需要做的是,在你认证Agogle s C2DM时,将装置的识别交给你的第三方服务器。 之后,你只是把通知数据推向C2DM,而google则向您发出通知。

我曾利用MQTT向Andan提供推介通知,而且事实证明这是一种良好、可靠、低功率的解决办法。

支持我的案件的一些联系已经启动。

http://mqtt.org/

http://panhendnicholas.com/archives/219”rel=“nofollow noreferer”> Power Profiling: MQTT on Anders/a.

基本生活 在甲型六氯环己烷中和甲型六氯环己烷的使用步骤





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签