implemented onunavailable and onservicelost event handlers
Merge pull request #3 from rodfernandez/0.0.3

implemented onunavailable and onservicelost event handlers