I want to make an appengine server that can push notifications to android devices locally, without publishing my app to google. Is that possible?
Using GCM (Google cloud Messaging), with or without Google App Engine, does not require you to publish your application on the play store as long as :
The play store is installed on the device.
A google account is configured on the device (not needed anymore for Android 4.0.4+).
See GCM overview (the first bullet list) for more details.
GCM cannot be used without an internet connection.
Related
I have purposely built Android mobile phone without Google Play or any of the Google services installed. I'm building Xamarin.Forms mobile app and need to show Push notification. I'm trying to do this using AppCenter, I can see that the device has been registered on Analytics, but no push messages are showing up. Am I missing anything?
Google announced it is migrating from the Google Cloud Messaging (GSM) platform to Firebase Cloud Messaging (FCM). For Android developers, the Firebase SDK is required to use Push Notifications. For additional information, please refer to the SDK migration guide.
and
Only devices with the Google Play Store application or emulators using Google APIs images can receive notifications.
https://learn.microsoft.com/en-us/appcenter/sdk/push/android
You need FCM (GCM is deprecated)
I've built an Android application by android studio.
I want to be associated with users online and notify changes and news.even when my application is closed.
This is what is on my mind,I have web server, i want create a internet connection listener and when connection is available,application or a part of it connect with the server and get new information and notify the user with a notification.even when my application is closed.
How can I implement and enforce it?
Try "Google Cloud Messaging."
Per their Developer Console Help page: "Google Cloud Messaging (GCM) is a free service that helps developers send messages across multiple platforms: Android, iOS, and Chrome. For example, a server can send messages directly to single devices, groups of devices, or devices subscribed to topics. Also, the application on a device can send messages directly to a server and to devices belonging to the same group."
Use the Google Cloud Messaging service alongside the Google Plugin for Eclipse. Google Cloud Platform explains as: "When targeting Android devices, it is easy to get started by using Google Plugin for Eclipse (GPE). GPE allows you to generate an App Engine Connected Android Project that provides the basic logic needed for sending push notifications using Google Cloud Messaging for Android from a mobile backend running on Google App Engine."
This could send messages for you without having to do the work on your own server. If this answer helped you, please consider up-voting or accepting it as the answer. Thanks, and best of luck on your project!
No,These systems are always some limitations and managed with others.I do not need to communicate with iOS or chrome ,I need to design a system that's all for me.Experience has shown me great services, such as Google services and any other company affected by political issues.for example i live in iran right now.
All production-oriented and knowledge-based services for this country is banned.
due to this problems i prefer to have my own messaging and notification system.
I'm writing a system app for a device that has
no Google Play Services nor Google Play Store installed.
I want to implement push notifications.
The device is running Android 4.2.2 and official Google GCM docs say:
A Google account is not a requirement on devices running Android 4.0.4 or higher.
But these docs are related to the new version of GCM which uses Google Play Services (not an option for me)
So I tried using the old, deprecated GCM helper library.
I installed GoogleServicesFramework4.0.x on the device (I can install GSF. but not Google Play Services)
I am now getting the AUTHENTICATION_FAILED error and registrationId is null.
I am guessing this is because no Google account is set up on the device.
Does the deprecated GCM library require Google account?
(My SENDER_ID is correct, I already checked that)
Basically, my question is:
Is it possible to make GCM work without Google account,
using the old, deprecated GCM helper library?
NOTE: I mustn't create Google account on the device (this is a requirement)
If this is not possible, then please suggest another way of implementing push notifications.
(Note that most of the push notifications providers actually use GCM "under the hood" (Urban Airpush, for example), so don't suggest those)
I would like to avoid having to poll server for notifications ("pull notifications") if possible,
thank you.
Just prior to the quote you posted (about Google account not being required), you have this :
It requires devices running Android 2.2 or higher that also have the Google Play Store application installed, or or an emulator running Android 2.2 with Google APIs. However, you are not limited to deploying your Android applications through Google Play Store.
Therefore it seems Google Play Store is a must for GCM to work.
Pushy is a paid alternative to GCM that works without Google Play Services. Alternatively, you can develop your own notification service using MQTT or XMPP.
As an alternative to GCM, you could use MQTT as an open source and popular push notification alternative when Google account and Google Play services are absent on the device. Facebook has used aspects of MQTT in Facebook Messenger.
MQTT implementation requires:
1) an MQTT broker which runs on the server side. This could be something like the mosquitto broker which is Open Source.
2) an MQTT client library which you include in your Android app, enabling your app to connect, subscribe, and publish messages. There are a number of Java options listed at http://mqtt.org/software
3) to come up with a way of uniquely identifying users or devices, and then use that as a topic so that you can individually publish a message to one device.
Dale Lane has written a nice guide on this (http://dalelane.co.uk/blog/?p=1599) and there is also a good set of resources about MQTT (https://github.com/mqtt/mqtt.github.io/wiki)
Also the blog post Github sample below provides a practical example to implement MQTT push notification for Android:
http://tokudu.com/post/50024574938/how-to-implement-push-notifications-for-android
https://github.com/tokudu/AndroidPushNotificationsDemo
I read about Google Cloud Messaging at http://developer.android.com/google/gcm/gcm.html.
It supports Third Party Application server to Android application push notification.
I am wondering whether it is possible to implement the same thing push/receive notification from an Android app on one mobile to the same Android app on another mobile using Google Cloud Messaging.
If not, is there any other free service available similar to Google Cloud Messaging?
An Android device can send a GCM message to another Android device. All it needs is the API Key (of the Google API Project ID that the app uses to register to GCM) an the Registration ID of the other device. Using these parameters it can send a GCM message to another device via an HTTP request.
Usually applications that use GCM require a 3rd party server in order to store the Registration IDs of all registered devices. If your app has a different way to let devices share their Registration IDs with each other without requiring a server, you don't need the server.
As far as I'm aware, there has to be a server in the middle to send the push notifications (Android -> Personal Server -> GCM Server -> Android)
So the Android device sending the notification would send some data to a script on the server (using a HTTP GET/POST), and that script would then send the push notifications to all the devices that you wanted it to
Following the example Code from google (GCM Client Example), you can build an app to get a registration ID for your device, but sending messages without a server wouldn't work in my opinion. I didn't tried by now, but what about using the Google Backend Starter, or (what I tried) using a Backend as a Service Provider like apiOmat if you can't afford or don't want to set up a server.
I am planning to use gcm push notifications. I have gotten my api key.
I understand that gcm requires each device to register before using the gcm service. What i am not clear about is the meaning of registration? Does each device user need to have a google account for the app to work on his device? Or any email address would do?
Any clarification would help.
There should be one Google account setup on device.. else the app won't be able to receive gcm push notifications.
After ICS 4.0.4 GCM does not require a Google Account.
Registration means that you need to register with Google Cloud the device running your application.
Also, after I/O 2013 GCMRegistrar library is deprecated. Applications using it still work but Google encourage developers to use GoogleCloudMessaging. This requires the Google Play Services Library in the device, if it is not, Google Play will attempt to install it. Google Accounts are still not necessary according to Google.
According to some folks out there GoogleCloudMessaging is buggy and does not work properly in certain devices reporting SERVICE_NOT_AVAILABLE when trying to register.