How do I send a raw (push) notification from the server side using an Azure mobile service?

Hi there!
Currently I'm able to send toast notifications to my user from my Azure mobile service using the following line of code in one of my server side scripts:
push.wns.send(opponent_id, payload, 'wns/toast', {
success: function(pushResponse) {
console.log("Sent push:", pushResponse);
request.respond(statusCodes.OK, {});
error: function(pushResponse) {
console.log("Error Sending push:", pushResponse);
request.respond(500, { error: pushResponse });
But I would like to send a raw notification to my user now, not a toast notification. I've set up a background tasks which runs as soon as a raw notification arrives(I've tested this through the diagnose option of my mobileservicehub and it works).
I want to send a raw notification now from the server side and I'm kind off lost on how to do that. I've looked for it but can't seem to find an answer to that question, I might be looking for the wrong stuff though.
I'm looking for a solution that looks the same as the one for a toast notification(as demonstrated in the code above).
Your help would be greatly appreciated!
Thanks in advance!
Jan

I found the solution to this it was in fact really really easy, I should have read the documentation more properly since it clearly said that the payload for raw notifications could be literally anything but the client has to take care of it.
So I figured that out!

Similar Messages

  • Are any Houston Chronicle for iPad readers not reliably receiving their daily push notification from the app?

    Ever since the update to ios 7, the push notification from the Chronicle has been VERY unreliable.  Is anybody else having a similar experience?

    Hi,
    1. Did you install any protection application on you iphone?
    2. Please try to test push notification to see if any error message is received when Lync 2010 is disappeared from notification setting.
    Test-CsMcxPushNotification -AccessEdgeFqdn <Access Edge service FQDN>
    Regards,
    Kent Huang
    TechNet Community Support ************************************************************************************************************************
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question.

  • How to fecth the contents of a mail from the server by using jsp

    hi
    Can any body tell me how to fetch the contents of mail from the server by using javamail api...please send me code if some one have
    bye.

    hi
    Can any body tell me how to fetch the contents of mail from the server by using javamail api...please send me code if some one have
    bye.

  • How to Get the excel sheet formula from the server side into the j2me app?

    How to Get the excel sheet formula from the server side into the j2me application?
    Here the excel sheet is in server side.i want to do get the excel sheet values (only some part of the excel sheet based on some conditions) from server side into j2me.In j2me I want to done some client side validation based on the formula of excel sheet.Then i resend the new updated data to the server.
    But here deosn't know any mehtod to get the excel sheet formula from server side.So kindly help me to get the excel sheet formula from the server.
    So how to get the excel sheet formula frome the server side into j2me Application...
    Plz guide me to solve this issue...
    thanks & regards, Sivakumar.J

    You should not post a thread more than once. You've crossposted this question to another forum. I have deleted that one.

  • How to manually completely remove a J2EE application from the server?

    Hello,
    I have created and deployed a certain test J2EE application.
    After I finished with it I wanted to remove it, yet I cannot do it: Any removal attempt, either by the SDM or Admin Tool, encounters exceptions and errors I cannot handle. I tried restarting the server, stopping the application yet nothing works. on telnet the application has always STOPPING ststus...
    Desperately, I have decided to manually remove this application from the server yet I don't know the steps.
    Can someone please give me a step-by-step guidance on how to completely remove this application from the server, so it won't appear anyome both at the SDM and at the deploy service of the WAS?
    Thank you in advance,
    Roy

    Hi Peter,
    I've reproduced the problem and created a thread dump. I believe these lines are the important ones:
    "SAPEngine_Application_Thread[impl:3]_10" prio=5 tid=0x080cc9d8 nid=0x18e0 in Object.wait() [8a8f000..8a8fdb8]
         at java.lang.Object.wait(Native Method)
         - waiting on <0x14450d88> (a java.lang.Object)
         at java.lang.Object.wait(Object.java:429)
         at com.sap.engine.services.ejb.EJBAdmin.destroyContainers(EJBAdmin.java:1145)
         - locked <0x14450d88> (a java.lang.Object)
         at com.sap.engine.services.ejb.EJBAdmin.commitStop(EJBAdmin.java:2529)
         at com.sap.engine.services.deploy.server.application.StopTransaction.commonCommitFinished(StopTransaction.java:262)
         at com.sap.engine.services.deploy.server.application.StopTransaction.commitCommon(StopTransaction.java:305)
         at com.sap.engine.services.deploy.server.application.StopTransaction.commit(StopTransaction.java:291)
         at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:310)
         at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhasesImpl(ParallelAdapter.java:327)
         at com.sap.engine.services.deploy.server.application.ParallelAdapter.runInTheSameThread(ParallelAdapter.java:111)
         at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhasesAndWait(ParallelAdapter.java:230)
         at com.sap.engine.services.deploy.server.application.RemoveTransaction.begin(RemoveTransaction.java:133)
         at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:292)
         at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhases(ApplicationTransaction.java:326)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.makeGlobalTransaction(DeployServiceImpl.java:3139)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.remove(DeployServiceImpl.java:903)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.remove(DeployServiceImpl.java:5056)
         at com.sap.engine.services.deploy.server.DeployServiceImplp4_Skel.dispatch(DeployServiceImplp4_Skel.java:885)
         at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:304)
         at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:193)
         at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:122)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Could you please advise how to proceed from here?
    Thank you in advance,
    Roy

  • How do you configure a client to update from the server

    I found the information on how to point clients to a software update server but the problem I have is the URL.
    The example is http://su.example.com:8088/index.sucatalog
    I don't have a URL as far as I know and if I did, is the default port 8088 or where can I change or check that?
    And where is a list of the catalog file for the specific versions of OS X?
    Basically I have 8 Macs all running Yosemite except for one running 10.8.5. Instead of all the machines hitting the internet for updates, I'd like just my server to down the updates and then all clients update from the server.
    If there is better instructions on how to do this, please point the way.
    TIA
    Chris

    John Lockwood wrote:
    This does mean you need to buy a DNS load balancer to do this. The Mac itself cannot.
    FWIW, OS X Server is capable of performing round-robin access with the inbound traffic using multiple IP addresses for a single host name.  The addresses are each of the software update servers in your server pool.
    This'll toss errors for some translations when one of the servers is down — you can tweak the definition if one of the servers is going to be offline for a while — but some of the updates will get through.
    Set the DNS TTL fairly short — probably somewhere between a few minutes and an hour — to allow the DNS translations to be changed fairly quickly, if your software update servers are prone to outages.

  • How can i find an excel file deleted from the server

    In our office we all have access to the main server. Recently a document that we need was deleted from the server. It's not in the trash. Can and how would we be able to find and recover this deleted document? Specifically I am looking for an excel document, and I already checked the recent docs on excel.
    thanks!

    Have the admin for the server restore the file from the backup

  • How do I restore my bookmarks and favorites from the Firefox servers using my recovery key with a new hard drive?

    I set up Firefox sync before getting a new hard drive. My understanding is that my favs and bookmarks would be stored on Firefox servers and could be synced to any of my devices.
    However, now that I'm trying to restore to my new hard drive, it appears that I was supposed to sync previously with another device. I do not remember that explanation previously. I thought that my data was in the cloud and could be pulled at any time.
    I have my recovery key. Can you help me?

    I don't use Firefox sync, but my assumption was the same as yours. Have you tried the steps in the last part of this article?
    [https://support.mozilla.org/en-US/kb/How%20to%20sync%20Firefox%20settings%20between%20computers#w_what-if-im-not-near-my-first-computer How to sync Firefox settings between computers > What if I'm not near my first computer?]
    Do you still have access to your old hard drive, or a backup of your old hard drive? You often can retrieve your bookmarks, saved passwords, settings, add-ons, and so forth from that. If you have access, a volunteer here can describe the process in more detail.

  • How can I install windows 7 in bootcamp from the install CD using superdrive

    Hey Guys.
    I'm a pilot and want to use flight simulator X which is a windows only program. So what I want to do is use bootcamp but when I go into bootcamp assitant I cant partion or install windows from the install CD its asking for a ISO file the following error occurs. "There is no USB drive connected to the system. Please insert a USB drive to continue " but the thing is I dont want to install from USB I want to install from USB Super Drive with the Installation Disk
    Thanks

    Make sure that the option to create a USB installation drive is unticked. Also, Boot Camp Assistant allows you to download the Windows support software onto a USB drive, that you will need after installing Windows to make the computer run correctly. You should do that.
    Apart from that, you should be able to continue with the Windows installation. Follow the Apple's steps > http://manuals.info.apple.com/en_US/boot_camp_install-setup_10.8.pdf

  • How do I remove an old hostname record from the server context?

    Hi there
    We have a machine that had changed its hostname, but still has the same IP address.
    This machine was being monitored by SunMC, but since the hostname has changed on the agent,
    the SunMC server is not collecting data from it.
    Throughout the troubleshooting process, I uninstalled/installed the agent on the client (as well as re-seeding, trying just the IP in the domain-config.x file)
    I removed the client from the server's topology (delete object/connection from the Edit menu), and created the object again, and I got the error that it could not connect (check agent/port blah blah).
    Then I tried creating it as an snmp ping, entering only the IP. When I looked at the details, I saw that it
    had taken the OLD hostname for that IP. Right-clicking on the object to make it an agent/host fails with the cannot connect error.
    I confirmed that the old hostname is still associated with that IP using this command, after deleting the object:
    es-run agentContext.sh agent <oldhostname> <port>
    and, sure enough, there's the old entry.
    So...I guess I need some magic command that is going to remove this old agent entry so I can get this
    machine added back in.
    There are a lot of critical servers in this domain, so I don't want to risk wiping everything out!
    Is there a nice way to do this?
    Thanks!

    An apple ID is nothing more than a "User ID"
    Actually, it is more than that. If you read the licensing agreements for any OS version or app obtained at the app store, it will become clear: the license for any app or OS obtained at the app store is not transferable. Hence it is tied to your Apple ID and will remain so - it cannot be removed.
    You are supposed to remove anything obtained at the app store from the computer before giving/selling it. Your father will also not be able to reinstall the OS if need be.
    Which OS version was on the Mac originally? You will need to use internet recovery (Command + Option + R) to erase your drive and then reinstall the original OS (if Lion or later). If it came with an install DVD, boot from that, erase the drive and reinstall. After that, your father can very easily download/update/reinstall any OS or app using his own Apple ID.

  • How to download a text file from the server

    hi everyone,
    can anyone tell me how to download and read a text file from the server and saved in into resource folder.
    with regards
    pallavi

    its really easy
    To read from server, use something like:
    HttpConnection connector = null;
    InputStream inp_stream = null;
    OutputStream out_stream = null;
    void CloseConnection()
         if(inp_stream!=null)inp_stream.close();
         inp_stream=null;
         if(out_stream!=null)out_stream.close();
         out_stream=null;
         connector.close();
         connector = null;
    public void getResponse(String URL,String params)
      try
         if(connector==null)connector = (HttpConnection)Connector.open(URL);//URL of your text file / php script
         connector.setRequestMethod(HttpConnection.POST);
         connector.setRequestProperty("User-Agent","Profile/MIDP-2.0 Configuration/CLDC-1.1");
         connector.setRequestProperty("content-type", "application/x-www-form-urlencoded");
         //connector.setRequestProperty("charset","windows-1251");
         //*** If you need to send ("arg1=value&arg2=value") arguments to script use this:
         out_stream = connector.openOutputStream();
         byte postmsg[] = params.getBytes();
         out_stream.write(postmsg);
         int rc = connector.getResponseCode();//in any case here connection will be opened & closed
         if (rc != HttpConnection.HTTP_OK)
              CloseConnection();
              throw new IOException("HTTP response code: " + rc);
         inp_stream = connector.openInputStream();
         int pack_len = inp_stream.available();
         byte answ[]=new byte[pack_len];
         inp_stream.read(answ);
         CloseConnection();
         ProcAnswer(answ);//process received data
      catch(Exception ex)
         System.err.println("ERROR IN getResponse(): "+ex);
    } And you can read from resource file like
    public void loadFile(String filename)
        DataInputStream dis = new DataInputStream(getClass().getResourceAsStream("/"+filename));
        String str="";
        try
             while (true)
                ch = dis.read();//read character
                if(ch=='\r')continue;//if file made in windows
                if(ch=='\n' || ch==-1)//end of line or end of file
                    if(str.length()==0)continue;//if empty line
                    //do some thing with "str"
                    if(ch==-1)break;//it was last line
                    str="";//next line
                    continue;
                 str+=(char)ch;
           dis.close();
       catch (Exception e)
           System.err.println("ERROR in loadFile() " + e);
    }Welcome! =)
    Edited by: MorskoyZmey on Aug 14, 2008 3:40 AM

  • How to download a pdf file from the server from an strut application?

    Hi,
    I wan to download a pdf file from the server side to local system. Please help me how i use the down load option.

    Read up on the Struts download action [1].
    And next time, please post in the relevant forum, one of the web-tier ones [2].
    [1] http://wiki.apache.org/struts/StrutsFileDownload
    [2] http://forum.java.sun.com/category.jspa?categoryID=20
    People on the forum help others voluntarily, it's not their job.
    Help them help you.
    Learn how to ask questions first: http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
    ----------------------------------------------------------------

  • How to upload image in windows azure mobile service from android?

    I am new in android I am using windows azure mobile service and I am Inserting Text data successfully but now I want to Upload Image in windows azure mobile service. I know its is possible by Azure Storage I have seen this chrisrisner post but
    its confusing can anyone tell me simple step by step process to save image in windows azure mobile service.
    I will be Very Grateful for you. its very urgent

    Hello Nitesh,
    Saving an image into Azure Mobile Services doesn't scale very well and it's not recommended. It's recommended to use Azure Blob Storage for blob storage. It's cheaper and can store larger files.
    You can definitely use both Azure Mobile Services and Blob Storage together by saving the name of the image in your Mobile Services table and storing the actual file in the Blob storage. This way when you need to retrieve the actual image, you would retrieve
    it by it's name from Blob storage.
    Here's a MSDN article that explains how to use
    Azure Blob Storage.
    Let me know if this helps.
    Abdulwahab Suleiman

  • Leave mails send to specefic email adresses on the server?

    I have several email adresses at my mail account, but for different users. I want Mail just to download my emails (send to my email adress) and leave the rest (send to other email adresses, but on same account) on the server.
    In Windows Mail I could put up a rule for the program not to download mails send to specefic email adresses from the server, but this doesnt seem to be an option in the Mail on the Mac OS. Any solution for this?

    Firefox doesn't do email, it's a web browser.
    If you are using Firefox to access web mail, you need to seek support from your service provider or a forum for that service.
    If your problem is with Thunderbird, see this forum for support.
    [http://www.mozillamessaging.com/en-US/support/]
    or this one
    [http://forums.mozillazine.org/viewforum.php?f=39]

  • TS1967 how to use push notification from itune

    hi i had update my iphone5 to new version ios and when some one will send me watsup msg or viber or instigram msg it not shown like the old version on screen and it shows me when i will go for watsup i need to connect my phone to itune and use the push notification _and am connecting my phone now to my laptop but i dont know how to do it

    Hi!
    I'm assuming you already know how to broadcast push notification and that your problem is just with pushing to a specific user. The push notification service in Azure Mobile Services will accept a channel Uri the question is: How do you get the channel Uri
    of the client you want to notify.
    You do that by storing the channel uri in your User entity. This way, when someone needs to notify a single user, the can query the user from the database (in your example, via the Email) and user the stored channel uri to notify that specific User.
    You can find out more about this technique
    here.
    Cheers,
    Sam.

Maybe you are looking for