[Haskell-cafe] GSoC Result - Communicating with Mobile devices - Push Notifications
marcospividori at gmail.com
Mon Sep 23 06:33:03 CEST 2013
I am happy to announce the result of 3 months working on the GSoC project:
"Communicating with mobile devices". After reading many documentation,
looking for a good abstraction, learning about mobile apps and networks
connections, and really valuable recommendations from my mentor, (I really
want to thank Michael Snoyman for his availability and kindness) I
succeeded in developing 3 libraries to make it easy to send push
notifications to mobile devices. They are available on Hackage:
** push-notify-0.1.0.0 : *This library offers a simple API for sending
notifications through APNS, GCM and MPNS.
** push-notify-ccs-0.1.0.0 :* This library offers an API for
sending/receiving notifications through CCS (XMPP - Google Cloud
Messaging).  <http://hackage.haskell.org/package/push-notify-ccs-0.1.0.0>
** push-notify-general-0.1.0.0 : *This library offers a general API for
sending/receiving notifications, and handling the registration of devices
on the server. It provides a general abstraction which can be used to
communicate through different services as APNS, GCM, MPNS, hiding as much
as possible, the differences between them.
Now, it is easy to send/receive information with mobile devices, so you can
develop server applications which interact with them.
So, to clarify this, as part of this project, I developed many test
examples, including Android/WPhone and Yesod apps.
I really want to thank FPComplete for giving me the possibility of hosting
the Yesod app. The code is available on GitHub:
and they are running online on:  <http://gsoc.marcospividori.com.ar/> ,
so can be downloaded and tested on mobile devices. (BackAndForth Messaging
and Connect4 apps)
** BackAndForth Messaging:*
In this example, I show how to use the push-general library to handle the
registration/reception and sending of messages. From a Yesod app
you can send notifications to devices registered and receive messages from
them. It is avaliable for Android and WPhone on
** Connect 4:*
I have been thinking of an app which lets me show how useful push
notifications are. The advantage of this notifications is that you can
receive information from server when it is available without needing to
continually poll. So, I started to think about a multiplayers game. Every
time a player does something, you let the rest know about the new movement.
So, I ran into the board game: "Connect 4".
Both, authenticated web players and users of the android app, can play one
against each other.
For actualizing the website  <http://gsoc.marcospividori.com.ar/> , I
use long polling, while for the Android app, push notifications.
The Android app is available on <http://gsoc.marcospividori.com.ar/apps>
Every feedback is welcome!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe