Send push notification with php - filter problem

2 posts, 0 answers
  1. Teo
    Teo avatar
    4 posts
    Member since:
    Dec 2013

    Posted 01 Nov 2014 Link to this post

    Hello :) 

    I'm trying to send push notifications with everlive and php. This is my code:
    $curl_url = '';
       $fields = array(
          'Android' => array(
              'data' => array(
              'title' => 'Push Title',
              'message' => 'Push message for Android',
              'customData' => 'Custom data for Android',

    Everything works perfect, but when I set Filter option, it doesn't work:

    'Filter' => array(
       'Parameters'=> array(
           'Age' => '15',

    I tryed to set it before Android filtering ( 2nd row), also as a property into the Android array. What I'm doing wrong :) 

    Thank you :)

  2. Anton Dobrev
    Anton Dobrev avatar
    607 posts

    Posted 03 Nov 2014 Link to this post

    Hello Teo,

    Could you please try with "stringifying" the filter object before sending the notification payload to the server? In addition - the Filter property should be on the same level as the Android key, but in order to be interpreted properly by the server you need to pass it as a JSON string.

    You can read more about how to construct the Filter in this documentation article (JavaScript example).

    Let me know if you have further questions.

    Anton Dobrev
    Everlive is now Telerik Backend Services, and is part of the Telerik Platform.
Back to Top