[Aerogear-users] Registering and unregistering from Simple Push and Unified Push

Sebastien Blanc scm.blanc at gmail.com
Mon Jul 6 05:14:16 EDT 2015


Hey,
sorry for the late response

On Wed, Jul 1, 2015 at 10:06 PM, mo <michi.oshima at gmail.com> wrote:

> Hi Sebastien,
>
> If the contents of the localStorage were deleted for one reason or another,
> then I believe the browser would have to register anew with SPS and UPS
> next
> time.  In that case the original registration would be a "bogus
> installation" on USP as Matthias puts it, I'm thinking.  Am I correct?

Yes

>   I
> don't know whether there's going to be any stale data on the side of SPS.
> Is there?
>
I think SPS has some kind of "reaper" service that does a clean up but to
be honest I don't know the details of it. Daniel (who is currently on
parental leave) could give you more details on that/

>
> Also, how should I detect whether registration with SPS is previously done?
> Would the `mailEndpoint` be falsey in that case?

Yes

> I'm talking about  this
> sample code
> <
> https://github.com/aerogear/aerogear-js-cookbook/blob/master/simplepush-unifiedpush-example/js/unifiedpush.js#L29
> >
> .
>
> Here's another, related question.  When we reuse registrations in the way
> you describe, is there any reason ever to call
> `navigator.push.unregister(...)` or
> `unifiedPushClient.unregisterWithPushServer(...)`???  I have not seen a
> sample code where `navigator.push.unregister(...)` was used.  I believe
> I've
> seen `unregisterWithPushServer(...)` somewhere.  Note, I don't exactly know
> what these unregister functions do.
>
This could be used when an user don't want to receive notification anymore,
imagine a config section in the webapp where the user can turn off the
notification for instance.


>
> Thank you.
>
>
>
>
>
> --
> View this message in context:
> http://aerogear-users.1116366.n5.nabble.com/Registering-and-unregistering-from-Simple-Push-and-Unified-Push-tp86p95.html
> Sent from the aerogear-users mailing list archive at Nabble.com.
> _______________________________________________
> Aerogear-users mailing list
> Aerogear-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/aerogear-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/aerogear-users/attachments/20150706/596aeca8/attachment.html 


More information about the Aerogear-users mailing list