client to server push notification? - android

I see lots of tutorials and articles online about Push Notifications, especially from Android devices. I'm wondering how you would send updates from your mobile device to a server. Or would the mobile device be the server in this scenario? Essentially, I aim to have a website set up where I can send notifications/updates/etc. to from my phone.

From Mobile you can call Webservice and send data to database server.
Push Notification mechanism is for Mobile devices.
For server to mobile you can use Push Notification. From Mobile to server Use Webservice

I assume you have your own server, in general, you have to create a Web Service, one of the most common ways now is RESTful web service,
Alternatively, as you are asking about Android, you should take a look at this
https://developers.google.com/cloud-messaging/
which provide upstream message, i.e. send from Android devices to server

Related

what technology used in mobile chat apps to receive messages?

I'm some kind of backend developer and don't know how mobile applications work. But I need to provide architecture for mobile chat application server.
I know that android apps using google services to receive push notifications from firebase, so we don't need run own application in endless loop and poll for new data at server.
That is prefect for push notifications, but firebase notification body limited by 4KB and don't fit for big messages.
So I can see only one realization:
Google services polling for FCM (ex-GCM) notifications
Receive some signal-like notification
According this notification my app go to server and download new message
Update local chat data
Show generated locally notification for new message
This way is looking pretty complicated, so I don't believe that this is only possible (and correct) way.
Another way is to keep websocket session opened every time or poll server manually. But these two operations should drain battery to much.
So how modern chat apps stay in sync even if they closed and device screen off?
if you really want to make modern chat app then do some research on XMPP
These can be some best practices you can follow
setup XMPP server on backend with offline storage support
use client XMPP SDKS for apps to connect XMPP server.
use push notification in case of server connection lost to wake app
and reconnect to XMPP
try to save large files on different server and send only url with
body if you want to keep your files urls private then use any
client SDK that support implementation of uploading and downloading
private file like AWSS3

For amazon SNS for mobile push notification, should i use server to register the device or directly from mobile

I am new to mobile app Development. For mobile push notification using SNS, we need to add device to SNS topic. One way is to directly make a call from the mobile app to amazon SNS.I need to send amazon aws_access_key_id and aws_secret_access_key with the request to register device to the topic which seems less secure.
Alternate way is to send the device id to backend server and add device from backend.
What is standard way to achieve this. I am unable to find relevant codebase and tutorials that explains it..

Implementing a chat application server for clients on Android/Windows Phone

I need to implement a group chat server which can support more than 50 users at a time.
The users will be only on mobile clients which include Android/Windows Phone.
Sending push notifs to the apps will not be difficult, as the server needs to do a basic curl request. So "polling" is not an issue.
My current skill set includes.
Flask
Google App Engine( I intent to use it or a web hosting
server.)
Basic php
So from what I know, I can make http requests to the server with user specific information+chat msg.
The server processes this and sends a broadcast using push notifs to all the devices stored in database.The server identifies the device from the data in the http request.
How efficient will this be?
If this is not the correct approach, what all do I need learn(sockets programming?) and any framework which can make my work easier (it will help if it is also supported on GAE).
I think you need XMPP messaging. It's support by App Engine but not in PHP : https://developers.google.com/appengine/features/
XMPP permit to send and receive chat messages.

Push notifications in a local network

I need to implement Push Notifications for Android and iOS using my own server in a local network with no Internet access.
More precisely, my users will have a mobile app (Android and iOS) which will connect to a local Server through a wireless network. This network won't have any Internet connection.
The server will need to send push notifications to the connected devices when some concrete events happen.
I'm using Django on the server side.
I've been researching a bit and it looks like using XMPP would be a neat solution. Thus I guess I need an XMPP Server to communicate with the mobile devices. I've seen several alternatives for the server side, though I don't understand completely what I need exactly. There are some XMPP servers such as Openfire and SleekXMPP. I'm not really sure what are they for. Should I choose one of them or use both?
On the other side, which alternatives are there in the app side?
What I need basically is some guidance on which technologies to choose and some references.
First if you decide with the XMPP protocol .. you can use any of the servers you mentioned and use any library for the mobile Smack for example for android, the mobile library will automatically update you with events using listeners .. it's a software layer that handles notifications.
Second if you want to implement it manually .. you'll have a service running on the mobile device that checks for updates periodically by requesting them from server.
Third The actual push notifications need to be registered over the internet, android for example need to communicate with Google Cloud Messaging.

Google Cloud Messaging for Android works from server to client, but also viceversa(from client to server)?

stackoverflow fellows,
Since I am very new in Cloud Computing matters, I would like to ask you a question: Google Cloud Messaging for Android works from server to client, but also viceversa(from client to server)?
I am asking you this, because I am currently developing an Android application. The structure, in general lines, it's something like: I would like to use my laptop as a server - and perform all the computations here. Then, from my server (laptop), to send everything in the cloud, and from the cloud, directly to my Android running device. I want to perform the computing and database storage on my local server (because, since I am a student, I won't have enough money to actually pay for a server from google (let's say), so I am focusing on what's free and suitable to my needs) and just communicate with my Android device using Google Cloud Messaging for Android. (I want my application to be independent from the hardware of my mobile device, and also, I want to write the program that will perform the computations on my server in Java).
I know that I can send messages from the server to my device(through cloud), but the question is: can I also send messages from my device to the server ? I am asking this, because the computations will be made after I submit something from my device (basically, my Android application will be an interface, from where I can send the data to my server (through cloud) and then receive (also through cloud) the results of the computation on my device)
According to what I've been currently reading (http://developer.android.com/google/gcm/index.html) it seems that I can only send messages from the server to my device, but I decided to ask, since, so far, was the only free messaging framework(using cloud) I have found.
Thank you.
You can use GCM Cloud Connection Server to send messages from device to server.
Paragraph from this page:
http://developer.android.com/google/gcm/ccs.html
The GCM Cloud Connection Server (CCS) allows third party servers to communicate with Android devices by establishing a persistent TCP connection with Google servers using the XMPP protocol. This communication is asynchronous and bidirectional.
Google Cloud Messaging for Android works from server to client, but
also viceversa(from client to server)?
Sorry but GCM(Google Cloud Messaging) is only made up for sending Push Notification from server to device. Not for Viceversa.
I know that I can send messages from the server to my device(through
cloud), but the question is: can I also send messages from my device
to the server ?
For sending the message or anything(For Example: Photo,files..) to Server why Don't you Use Web services for it. I think it will Be suitable according to your Needs.
It is correct what KashifB wrote:
You can use GCM Cloud Connection Server to send messages from device
to server.
But keep in mind that Messages with Payload have a size limit of 4kb per message.

Categories

Resources