Android Push Notification without using GCM

2019-01-16 15:06发布

问题:

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.

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.

回答1:

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

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/

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

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

Similar Question: Android push message without gcm possible?

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 PushJet PushKin and much more.