Changes

Jump to: navigation, search

CloudServices/Presence

2,024 bytes added, 13:30, 22 November 2013
Presence on other platforms
==Presence on other platforms==
 
===Presence on iOS===
 
In iOS >= 7.x, applications that want to provide a presence feature
can keep a socket opened in the background even if the application
is not running anymore in the foreground.
 
The feature is called setKeepAliveTimeout (https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIApplication_Class/Reference/Reference.html#//apple_ref/occ/instm/UIApplication/setKeepAliveTimeout:handler:)
and will give the app the ability to register a handler that
will be called periodically to check on the socket connection.
 
The handler has a limited time to do it (max 10 seconds) but
this is enough to handle presence for the user by interacting with a
server
 
The Apple Push Notification Service https://en.wikipedia.org/wiki/Apple_Push_Notification_Service
is also often used by applications to keep a connection opened on a
server to receive push notifications. That's comparable to the Simple Push
service Mozilla has added in Firefox OS.
 
Therefore, building an application with device-level presence on an iOS device
is doable but requires the publisher to maintain one or several connections per user
opened all the time.
 
=== Presence on Android ===
 
Like iOS, Android provides features to run some services in the background,
see http://developer.android.com/guide/components/services.html
 
However, the service can be killed when the memory becomes low, and
if TCP/IP is used it can be hard to have a reliable service.
 
Google also provides a "Cloud Messaging" service - http://developer.android.com/google/gcm/index.html
That provides similar features than Simple Push, to push notifications to users.
 
There's also a new feature called GCM Cloud Connection Server - (CSS)
http://developer.android.com/google/gcm/ccs.html - that allows applications to communicate
with the device via XMPP
 
There's a full example on that page, of a Python server interacting with the GCM service
to interact with users.
 
It's '''very''' similar to what we want to build with Mozilla Presence.
==Architectural Overview==
Confirm
927
edits

Navigation menu