I am developing an Android application that can send notifications (not "push") to any other Android device. Apart from Google Cloud Messaging (GCM) are there any alternatives to do so?
I do not plan to use GCM. My only requirement is to send the notification from my app to any other device via either Bluetooth or WiFi.
I have tried using the basic Notification API for Android but I could not send a notification to other device. It shows me a local notification.
this may helps https://www.firebase.com/docs/java-quickstart.html
firebase sync the devices and whatever you send it to server it automatically pushes that in other device
Related
My organisation is looking at implementing 2 step authentication using push notifications sent to a mobile app on Android or IOS and I am struggling to automate the associated scenarios within our Testcafe testsuite, which include
enabling 2SA and connecting the mobile device via QR code scan from the web page and push confirmation
Login, where push notification is sent to the mobile device automatically after success username/password authentication
disabling 2SA via an automatically sent push notification to the mobile device
Is it possible to automate these scenarios using Testcafe, maybe using some mobile emulator or 'catching' the notifications at the API? To my knowledge, Testcafe is foremost targeted at browser testing and can also do API calls, but not consuming API messages without an associated call.
If you mean mobile push notifications (not web push notifications via Push API), there is no way TestCafe can access them since these notifications are native.
I am thinking one of the following technologies to use to build an Android Push Notification Server (not to use Google Cloud Messaging/GCM neither FCM):
Atmosphere Framework (http://async-io.org/)
Eclipse Mosquitto (https://mosquitto.org/)
The overall goal of this project is to allow Android application using the Custom Android Push Notification server be able to receive and display notification like this:
The first question would be: if an Android application does not utilize GCM or FCM would it be able to display notifications similar to those that use GCM or FCM?
Then if we use either the Atmosphere Framework or the Eclipse Mosquitto as a Push Notification Server would it be able to send push notification on an Android device without relying on GCM or FCM?
Also, I assume that if not using GCM or FCM then it is not possible for the registered Android device to receive a push notification from the custom APN server if the application that uses the custom APN is not running? This is correct, right? If so, then what would be the work-around? Make sure the Android application is running in the background?
Is it possible to create an app that can send notification to the user who does not have the same app installed on his device.
I have come acrossed 'Push Notification' service via GCM and FCM but it requires the app being installed on both the devices to communicate or send notification.
(P.S- No suggestion for web application to user mobile service)
You can use other means of communication like SMS or email.
No. Notifications even though coming from Android Google servers are part of the app environment. So you cannot send an app notification to non app users. If that was the case imagine getting app notifications from Amazon and whatnot.
But you can use some other means like mail, sending links of your app via mail/sending invites via mail or SMS.
I have an apps in Android and I need code for sending notification one device to another device, that notification is also store into the database.
Thanks
You cannot send a "notification" from one device to another. Notifications occur on only one device.
You can send messages (like "SMS" or "push notifications") from one device to another. Google Cloud Messaging (GCM) is convenient for Android to Android messaging. To other devices, you might have to get more complicated, use a service (like parse.com) or even build your own XMPP server.
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.