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

implemented onunavailable and onservicelost event handlers