I´m developing a Phonegap app and I need to send different notifications to several groups of users.

I created an account on Pushwoosh and I´m still on trial, and apparently I have access to all the functions for 15 days (I don´t know if this is correct).

In my Phonegap app I copied the code from here and I have this:

function registerPushwooshAndroid() {
    var pushNotification = window.plugins.pushNotification;
    document.addEventListener('push-notification',
        function(event)
        {
            var title = event.notification.title;
            var userData = event.notification.userdata;
            if(typeof(userData) != "undefined") {
                console.warn('user data: ' + JSON.stringify(userData));
            }
            alert(title);
        }
    );
    pushNotification.onDeviceReady({ projectid: "MYPROJECTID", appid : "MYAPPID" });

    pushNotification.registerDevice(
        function(token)
        {
            alert(token);
            onPushwooshAndroidInitialized(token);
        },
        function(status)
        {
            alert("failed to register: " +  status);
            console.warn(JSON.stringify(['failed to register ', status]));
        }
    );
}

function onPushwooshAndroidInitialized(pushToken)
{
    console.warn('push token: ' + pushToken);

    var pushNotification = window.plugins.pushNotification;

    pushNotification.getPushToken(
        function(token)
        {
            console.warn('push token: ' + token);
        }
    );

    pushNotification.getPushwooshHWID(
        function(token) {
            console.warn('Pushwoosh HWID: ' + token);
        }
    );

    pushNotification.getTags(
        function(tags)
        {
            console.warn('tags for the device: ' + JSON.stringify(tags));
        },
        function(error)
        {
            console.warn('get tags error: ' + JSON.stringify(error));
        }
    );

    pushNotification.setLightScreenOnNotification(false);

    pushNotification.setTags({"UserGroupID":["1"]});

    pushNotification.setTags({deviceName:"hello", deviceId:10},
        function(status) {
            console.warn('setTags success');
        },
        function(status) {
            console.warn('setTags failed');
        }
    );
}

In the Control Panel of Pushwoosh I created a tag named UserGroupId with a value "1", and when I want to send a notification using this filter I don´t receive the notification in my devices. If I clear the filter it works ok, and for example if I use a filter with a default tag like "OS version" it works fine too.

Any ideas of what I´m doing wrong? I need to be sure that the filters that I create works so I can pay and upgrade my account.

Thanks in advance.

asked 10 Apr '15, 16:29
ignaciodeluc's gravatar image

ignaciodeluc
1112

Hi, it would be best if you could contact us via help@pushwoosh.com and provide your username, so that we could investigate.

(15 Apr '15, 08:48) Benedict Benedict's gravatar image
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×445
×165
×12

question asked: 10 Apr '15, 16:29

question was seen: 2,814 times

last updated: 15 Apr '15, 08:48