Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Delite Studio

    (@delitestudio)

    Hello! There’s an API also for that. It’s called Unregister API. You can find more info here. Hope it helps!

    Thread Starter Satish

    (@technotip)

    I tried this ..but still receiving the notification ??

    Plugin Author Delite Studio

    (@delitestudio)

    If you have implemented it correctly you will see the token disappearing from the token list. If not, you will still receive notifications.

    So, double check you have implemented it correctly.

    Thread Starter Satish

    (@technotip)

    I’m using this, and it works for registration API, but doesn’t work for unregister API ??

    var androidConfig, iosConfig, register;
    
        androidConfig = {
            "senderID": "920573560210"
        };
        iosConfig = {
            "badge": true,
            "sound": true,
            "alert": true
        };
    
        register = function(os, token) {
            var baseUrl;
            baseUrl = 'https://thinkwithsatish.com/pnfw';
            if (!baseUrl) {
                return $q.reject();
            }
            return $http({
                method: 'POST',
                url: baseUrl + '/unregister',
                headers: {
                    'Content-Type': 'application/x-www-form-urlencoded'
                },
                transformRequest: function(obj) {
                    var p, str;
                    str = [];
                    for (p in obj) {
                        str.push(encodeURIComponent(p) + '=' + encodeURIComponent(obj[p]));
                    }
                    return str.join('&');
                },
                data: {
                    os: os,
                    token: token
                }
            });
        };
    $cordovaPush.register(androidConfig).then(function(result) {
        $log.debug('android push notification unregistration success', result);
    }, function(err) {
        $log.error('android push notification unregistration error', err);
    });

    Please help ..

    Thread Starter Satish

    (@technotip)

    or should I use

    $cordovaPush.unregister(androidConfig).then(function(result) {
        $log.debug('android push notification unregistration success', result);
    }, function(err) {
        $log.error('android push notification unregistration error', err);
    });

    Is it correct to pass ‘androidConfig’ to $cordovaPush.unregister() ??

    Plugin Author Delite Studio

    (@delitestudio)

    Please note that we do not give client-side code level support on the plugin.

    Hello Support,

    I need to clarify how can i get token_id , and other parameters and after that how can i insert on my database these parameters

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How a user can unregister?’ is closed to new replies.