Unable to send push notification via an MBaaS service

Solution Verified - Updated -

Issue

  • Unable to send push notification via an MBaaS service
  • Code implementation using fh.push works for cloud application but is not working for MBaaS service. Following a code example of this implementation.

    var message = {
      'alert': 'Hello Push Notification!',
      'sound': 'default'
    };
    
    var options = {
      // Using broadcast:true to send push to all client apps in the project
      // See http://docs.feedhenry.com/v3/api/api_push.html#api_push-node_js_api
      apps: ['d7hgi2u6ep44m3guv3aqqvql'],
      criteria: {
        alias: ['tech@demo.com']
      }
    };
    
    // dispatch the payload message to the internal push server
    $fh.push(message, options, function (err, res) {
      if (err) {
        console.log('Push error:' + err.toString());
      } else {
        console.log("status from Unified Push : " + util.inspect(res));
      }
    });
    

Environment

  • Red Hat Mobile Application Platform 3.13.0
  • Push notification
  • AeroGear unified push server
  • fh-mbaas-api

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content