Register callbacks to receive the push messages and other infos.
Please see the spec for more infos on those callbacks and their
parameters.
This needs to be called BEFORE registerApp so onNewEndpoint get called
and you get the info in your app, or this will be lost.
Register the app to the saved distributor with a specified token
identified with the instance parameter
This method needs to be called at every app startup with the same
distributor and token.
Send an unregistration request for the instance to the saved distributor
and remove the registration. Remove the distributor if this is the last
instance registered.