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.
Related
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 want to know if it is possible in google cloud messaging api to send messages directly from one android device to another without relying on our app server. I don't have a server so is it possible to send messages device to device through gcm?
GCM supports device to device messaging. However, your devices would need to somehow know registration ids of each other, which is hardly achievable without coordination from your own server.
Currently sending a device to device message is not possible with GCM, even if the two devices have exchanged InstanceId tokens.
I follow this link PLease see here . Can anyone tell me exact process to communication between two mobile devices in terms of push notification. Please help me.
GCM is a google cloud messaging http server.It is used for providing notification service on android phones any notification you receive on your phone is sent through GCM.Every device using a specific application is registered with GCM. Even if you want your application to send notification to the user on occurrence of something it's not possible without GCM.
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
Here I am developing an android app which deals with housing complex.
In this app their are 2 kinds of users:
Builder/Complex Owner
Flat Owner.
Now here the Builder/Complex Owner can send push notification to flat owners.
How can I achieve that? Please help.
Here I cannot use G.C.M as G.C.M. is used for server side push messaging.
Not sure if there is any other way. What you could do is to let the app send a push notification request to the server, then the server would issue the push notification through G.C.M. If you don't have a server available you could do it through text messages but be sure to have a good text messaging plan. You could possibly also use an existing service (for example Facebook) and send the messages through their API.
EDIT:
To do it via text messages: SMS receive with no notification. Again, make sure that you have a good text messaging plan if doing this. Sending an SMS to ten different people will count as ten different SMS messages.. If you have a lot of users it would probably be cheaper to get hold of an SMS server. But then again, you should just use G.C.M.
It is possible to send device to device push notification using gcm.See this link.