[Aerogear-users] push.unregister() not working Cordova 5.0.0 for Android

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Aerogear-users] push.unregister() not working Cordova 5.0.0 for Android

Jesús Martín González
Hi all,

I'm starting to use pushplugin for Cordova android and i have followed all instrucctions and examples available at: https://aerogear.org/docs/specs/aerogear-cordova/Push.html and other pages. I can receive notifications but when I try to unregister the device an error message appear: "Seems this device is already unregistered" and it is wrong because I am still receiving notifications.

I am using cordova 5.0.0 and deploying to android, i am using this for unregister: 

push.unregister(successHandler, errorHandler);
function successHandler() {
    alert("notificaciones desactivadas");
}

function errorHandler(message) {
    alert("error " + message);
}


Can you help me?

Thanks

--
Jesús Martín Gonzalez
Tel: +34 654420529


_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users
Reply | Threaded
Open this post in threaded view
|

Re: [Aerogear-users] push.unregister() not working Cordova 5.0.0 for Android

Erik Jan de Wit
Hi,

You would rarely need unregister this is from the android doc:

You should rarely (if ever) need to call this method. Not only is it expensive in terms of resources, but it invalidates your registration ID, which should never change unnecessarily. A better approach is to simply have your server stop sending messages. Only use unregister if you want your application to stop using GCM permanently, or you have a compelling reason to recycle your registration ID

The error you are getting is wrong though, seems that that it doesn't have a deviceId anymore I'll investigate 

On Tue, Jul 28, 2015 at 11:58 AM, Jesús Martín González <[hidden email]> wrote:
Hi all,

I'm starting to use pushplugin for Cordova android and i have followed all instrucctions and examples available at: https://aerogear.org/docs/specs/aerogear-cordova/Push.html and other pages. I can receive notifications but when I try to unregister the device an error message appear: "Seems this device is already unregistered" and it is wrong because I am still receiving notifications.

I am using cordova 5.0.0 and deploying to android, i am using this for unregister: 

push.unregister(successHandler, errorHandler);
function successHandler() {
    alert("notificaciones desactivadas");
}

function errorHandler(message) {
    alert("error " + message);
}


Can you help me?

Thanks

--
Jesús Martín Gonzalez
Tel: <a href="tel:%2B34%20654420529" value="+34654420529" target="_blank">+34 654420529


_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users




--
Cheers,
       Erik Jan

_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users
Reply | Threaded
Open this post in threaded view
|

Re: [Aerogear-users] push.unregister() not working Cordova 5.0.0 for Android

Summers Pittman

On Tue, Aug 11, 2015 at 10:50 AM, Erik Jan de Wit <[hidden email]> wrote:
Hi,

You would rarely need unregister this is from the android doc:

You should rarely (if ever) need to call this method. Not only is it expensive in terms of resources, but it invalidates your registration ID, which should never change unnecessarily. A better approach is to simply have your server stop sending messages. Only use unregister if you want your application to stop using GCM permanently, or you have a compelling reason to recycle your registration ID

The error you are getting is wrong though, seems that that it doesn't have a deviceId anymore I'll investigate 

On Tue, Jul 28, 2015 at 11:58 AM, Jesús Martín González <[hidden email]> wrote:
Hi all,

I'm starting to use pushplugin for Cordova android and i have followed all instrucctions and examples available at: https://aerogear.org/docs/specs/aerogear-cordova/Push.html and other pages. I can receive notifications but when I try to unregister the device an error message appear: "Seems this device is already unregistered" and it is wrong because I am still receiving notifications.

I am using cordova 5.0.0 and deploying to android, i am using this for unregister: 

push.unregister(successHandler, errorHandler);
function successHandler() {
    alert("notificaciones desactivadas");
}

function errorHandler(message) {
    alert("error " + message);
}


Can you help me?

Thanks

--
Jesús Martín Gonzalez
Tel: <a href="tel:%2B34%20654420529" value="+34654420529" target="_blank">+34 654420529


_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users




--
Cheers,
       Erik Jan

_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users



_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users