不使用 GCM 的 Android 推送通知
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20329403/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Android Push Notification without using GCM
提问by Senthil Mg
I need brief steps to implement GCM without using android's standard way. Instead I need to set up my own central server for device registration, and upload file from server to registered device without using GCM.
我需要简单的步骤来实现 GCM 而不使用 android 的标准方式。相反,我需要为设备注册设置自己的中央服务器,并在不使用 GCM 的情况下将文件从服务器上传到注册设备。
I also need some suggestion to block certain applications via admin console(For example: Need to choose and send an notification to particular device to block user to launch gmail/Google Play application installed on device). It's more like the concept Mobile application Management. Let me have suggestion on these.
我还需要一些建议来通过管理控制台阻止某些应用程序(例如:需要选择并向特定设备发送通知以阻止用户启动安装在设备上的 gmail/Google Play 应用程序)。它更像是移动应用程序管理的概念。让我对这些提出建议。
回答by Mdlc
A few things to get your started:
一些让你开始的事情:
MQTT / Paho
The Paho project provides open-source client implementations of MQTT and MQTT-SN messaging protocols aimed at new, existing, and emerging applications for Machine?to?Machine (M2M) and Internet of Things (IoT).
http://www.eclipse.org/paho/https://developer.motorolasolutions.com/docs/DOC-2315
MQTT / Paho
Paho 项目提供 MQTT 和 MQTT-SN 消息传递协议的开源客户端实现,针对机器到机器 (M2M) 和物联网 (IoT) 的新的、现有的和新兴的应用程序。
http://www.eclipse.org/paho/ https://developer.motorolasolutions.com/docs/DOC-2315
AndroidPN
This is an open source project to provide push notification support for Android. A xmpp based notification server and a client tool kit.
https://sourceforge.net/projects/androidpn/
AndroidPN
这是一个为 Android 提供推送通知支持的开源项目。基于 xmpp 的通知服务器和客户端工具包。
https://sourceforge.net/projects/androidpn/
Tutorail
Quick example on how to implement push notifications for your Android app using MQTT protocol. I will NOT discuss here why an application might need push notifications or the advantages of Push over Pull. I assume that you know exactly what I mean by push notifications are and why you might need them. However, before jumping in straight to the good stuff, let's go over how it all started.
http://tokudu.com/post/50024574938/how-to-implement-push-notifications-for-android
关于如何使用 MQTT 协议为您的 Android 应用程序实现推送通知的Tutorail快速示例。我不会在这里讨论为什么应用程序可能需要推送通知或 Push over Pull 的优势。我假设您确切地知道我所说的推送通知是什么意思以及您可能需要它们的原因。然而,在直接进入好东西之前,让我们回顾一下这一切是如何开始的。
http://tokudu.com/post/50024574938/how-to-implement-push-notifications-for-android
The Deacon Project (Deprecated)
The Deacon Project aims to produce an open-source push notifications library for the Android platform. “Deacon” is a Java class library used by Android developers to receive Push notifications from a Meteor comet web server. “Deacon-Demo” (http://github.com/davidrea/Deacon-Demo/) is an Android app that is used for testing and demonstration of Deacon, and is also developed by members of the Deacon project.
https://github.com/davidrea/Deacon
Deacon 项目(已弃用)
Deacon 项目旨在为 Android 平台生成一个开源推送通知库。“Deacon”是一个 Java 类库,Android 开发人员使用它来接收来自 Meteor Comet Web 服务器的推送通知。“Deacon-Demo”(http://github.com/davidrea/Deacon-Demo/)是一款用于Deacon的测试和演示的Android应用程序,也是由Deacon项目的成员开发的。
https://github.com/davidrea/Deacon
Similar Question:Android push message without gcm possible?
类似问题:没有 gcm 的 Android 推送消息可能吗?
In addition, if you'd like to have your own server but would still let GCM take care of delivery (it really is one of the cheapest, if not free, and reliable ways to send notifications) there are lot's of alternatives. Like PushJetPushKinand much more.
此外,如果您想拥有自己的服务器,但仍然让 GCM 负责交付(它确实是最便宜、如果不是免费且可靠的发送通知的方式之一),则有很多替代方案。像PushJet普希金和更多。