dimanche 19 avril 2015

Asynch notifcations from Android SMS using REST

I have implemented a RESTLET REST Api for Android which gives me access to the sms messages on an Android device. This works fine when I do a pull type request from the client.


However I would like to notify the client when a SMS arrives. Android has a callback internally to notify me however I am trying to work out what the best way to notfy the client is asynchrobously. Options I have considered:



  1. Client peridoically polls - Ideally would like to avoid as it is wasteful and will most likely have battery draining impact

  2. Asynch Push - Not sure how to do this with a REST API and in particular RESTLET


I am keen to hear what people think is the best approach and indeed if there is a design pattern for how to do option 2.


Regards,


Aucun commentaire:

Enregistrer un commentaire