locked
Push Notification Channels Azure JS Backend RRS feed

  • Question

  • I'm developing a Xamarin.Forms app right now and am having some trouble configuring push notifications. I have followed the docs on (can't give links yet)/documentation/articles/parner-xamarin-mobile-services-xamarin-forms-get-started-push/ but this only teaches you how to respond to a request with a push notification.

    How can I create a push notification and send it to a user in Xamarin.Forms? How can I set up different push channels so that specific groups of users are notified at a single time?

    As it is, here is my Javascript backend code for responding with push notifications:

    function insert(item, user, request) {
      // Execute the request and send notifications.
         request.execute({
         success: function() {                      
          // Create a template-based payload.
          var payload = '{ "message" : "New item added: ' + item.text + '" }';            
    
          // Write the default response and send a notification
          // to all platforms.            
          push.send(null, payload, {               
              success: function(pushResponse){
              console.log("Sent push:", pushResponse);
              // Send the default response.
              request.respond();
              },              
              error: function (pushResponse) {
                  console.log("Error Sending push:", pushResponse);
                   // Send the an error response.
                  request.respond(500, { error: pushResponse });
                  }           
           });                 
          }
       });   
      }
    Sunday, October 25, 2015 4:50 PM

All replies

  • I found the answer her: http://stackoverflow.com/questions/20950514/how-to-send-a-notification-for-a-particular-android-device-by-gcm-through-window
    Tuesday, October 27, 2015 5:34 AM