Where do the Gmail/Outlook iOS and Android App Handle Polling Logic - android

We are researching different approaches to run a background task in Android and iOS. We have heard client-side tasks can be very battery intensive. Since our app involves polling an imap server, why not compare to a similar service.
We were wondering, which approach does Gmail/Outlook use? Does it poll and check email on the client device using a background task, then send a local notification? Or does it poll and check on its servers and send a remote notification via its GCM push notification service to the client?

Related

How to messengers receive notification messages from servers?

Currently I am working on an alert app, which receives push notifications from a server. Reading a lot about that topic on the internet lead me to firebase which can be used to achieve that.
Now I was wondering: Are Whatsapp, Signal and other messengers using firebase or do they have any other solution to receive messages from servers even if the app is not active opened?
They use push messaging. It might be firebase, it might be another provider. MQTT is popular. All any of those things do is open up a persistent socket connection to a server and listen for messages. The trick is that whatever process is doing that needs to be whitelisted from power management restrictions, because you don't want to delay your message notifications for 15 minutes.
Now if you're writing something that's supposed to be robust queueing on the server side and deduping on the client side would be a good idea. But the basics is open socket connection and block on it on a thread.

Remote push notifications on Android with RAD Studio XE6 using my own server

I need to develop an application on Android that receives messages from my server in push mode,
even when the app is closed.
That is, suppose we have 100 apps installed, these apps should receive a text message from my server.
If the application on Android is closed, you should receive a notification, then tap the notification, the application should open showing the entire message.
I have no experience on the BAAS services, so would appreciate a small example "client / server"
To receive the push messages without Google Cloud Messaging, you need a client app which is constantly running, or which is launched in regular intervals (by the Android AlarmManager).
You can use any technology / protocol you like, for example HTTP(S), MQTT or STOMP to implement the client/server communication.
With HTTP(S) you can use long polling or upgrade to WebSocket connections.
A major disadvantage is that these solutions will consume more resources (CPU, battery) compared with the built-in Google Cloud Messaging.

Server on Android phone

I want to have an active service on my android phone.
This server will be available from clients in my local network.
Communication can be any (for example a rest api service on android)
In other words I want my service to handle external push notification but from local network not GCM.
What are know approaches to achieve this?

Is it possible to use Google Cloud Messaging for my system?

I am developing a client server system. The server is a Java application that runs 24/7 and get information from the web all the time to keep updated. The client is an Android app.
This is the way that the system has to work:
The client can register to the server for some information.
If the client registers correctly, the app has to run in background 24/7 waiting for server messages.
The server has to know the clients registered and send the information to all the registered devices everytime its information is updated.
If the client receive information that meets a condition then it stops running in background, unsuscribe to the server and activate an alarm.
My questions are:
Is it possible to do the communication using Google Cloud Messaging?
The way to do the client run in background 24/7 is using android services or am I wrong?
Thanks,
SB
you definitely can and should use GCM, that's why it exists. doing anything else is going to be a lot of work to get right, and is going to be highly inefficient when it comes to network and battery usage,
http://developer.android.com/google/gcm/index.html

Are Remote Notifications delivered as soon as they are received from the server on Android

Android: Are Remote Notifications delivered as soon as they are received from the server on Android? Also can we schedule a notification on Android?
If you're talking about GCM, yes all notifications aim to get to the recipient as soon as they physically can (network latency etc, which Google cannot control).
No, currently you cannot schedule these. The best you can do is on your server to schedule them with cron or something similar
See the dev site for more information: http://developer.android.com/guide/google/gcm/adv.html

Categories

Resources