Send RAW notification with template

Hi all,
I'm building an app and I'm using Azure Notification Hub to send notification to several devices (Windows Phone/Android/iOS),
I would like to use templates when I'm sending the notifications,
I could find an example how to register the device for RAW notification :-(
when I'm calls the method RegisterTemplateAsync, I get the following error "The payload is not in accepted XML format. The first node should be Badge/Tile/Toast. If want to send raw notification, please set header to wns/raw."
Does anyone know how to solve that issue?
Thanks

Where do you put all of this? The error only says to set header to wns/raw. Can we just set the WindowsNotification() header like so:
Notification notification = new WindowsNotification("test message from AZURE");
notification.Headers.Add("X-WNS-Type", @"wns/raw");
Also, I spent a long time looking for a simple solution to sending raw push notifications from Azure Mobile Services and thanks to this post I figured it out. Here's my example ScheduledTask showing how to send a raw push notification.
public class SyncPhoneDatabaseJob : ScheduledJob
public ApiServices Services { get; set; }
protected override void Initialize(ScheduledJobDescriptor scheduledJobDescriptor, CancellationToken cancellationToken)
base.Initialize(scheduledJobDescriptor, cancellationToken);
public async override Task ExecuteAsync()
try
NotificationHubClient hubclient = Services.Push.HubClient;
Notification notification = new WindowsNotification("Raw test message from Zumo.");
notification.Headers.Add("X-WNS-Type", @"wns/raw");
var outcome = await hubclient.SendNotificationAsync(notification);
catch (Exception e)
Services.Log.Error(e.ToString());
protected override void Dispose(bool disposing)
base.Dispose(disposing);
if (disposing)
// Run disposal code

Similar Messages

  • How to send email notification with the help of OID

    I have a query,is there a way to send email notification (something like password change) to users from OID(Oracle Internet Directory)?
    Regards,
    Arun K M

    Macs newer than 10.7's release just need to boot with the 'D' key.  
    Otherwise you need to find the original installer disk of the Mac, or call AppleCare for it to be able to run the hardware diagnostic.

  • Sending Push Notifications with Adobe DPS

    Question.
    I'm testing out all the Adobe DPS and Apple options. And one of the things I would like to test is Push Notifications.
    I followed the iPad publishing guide to be able to get all the certificates so that's ok. Then I was looking for a way to send
    push notifications. Because Adobe DPS doesn't really have a UI environment (PLEASE correct me if I'm wrong ;-) to send push
    notifications I have to do it 'by hand'. When I tested my app on my iPad I got the "app name wants to send you push notifications",
    so i'm sure my certificates are working. Now I just need to send a push message.
    So I followed this great tutorial:
    http://www.raywenderlich.com/3443/apple-push-notification-services-tutorial-part-12
    I was able to do everything and was able to send a push notification ... but I never received it. And the reason for this is because
    I don't have the app device token, which is a 64 character serial number which acts as your app address. So I don't have any way of sending the notification
    to my particular app. (which is a test sideload multifolio app).
    Because the Adobe DPS is cloud based you don't get any code (which I love). But I think that is currently stopping me
    from finding out my device token.
    What I'm asking:
    - Does this mean I can't send any push notifications to Adobe DPS created apps?
    - If this is supported somehow, I suppose (again, correct me) I need the app device token for the created app. Where do I get this?
    Thanks !

    At this time, it's not possible to manually push notifications. When you enable push, only publishing a new folio displays the red badge. At some point, when third-party push is supported, manual pushes will be possible.

  • Sending Localized Notification using Template feature of Notification Hub

    I am using Template feature of Notification Hub for sending localized Toasts to my app. It is working fine.I am using this ref - Localized
    News Using Notification Hub.
    In this reference they indicate that We have to send Key-Value (News_en-"message in English") pair for each culture.
    Suppose I am supporting 100 cultures in my app and I only want to send localized news to two culture only-> mean all other culture should get he default news in English.
    So should I have to send 100 key-value pairs also in this case ?
    Is it possible somehow that we send only required localized key-value pairs and other will get the default English toasts.

    Hi Tanuj,
    Unfortunately you have to send 100 key value pairs, if you have 100 cultures.
    I’m wondering, if you want some cultures to receive notifications only in English, why don’t you register them in en format (News_en) though local is different. That way you can reduce number of key value pairs.
    Thanks,
    Sateesh
    Mark Post as helpful if it provides any help.Otherwise,leave it as it is.

  • Send email-notifications with CC-header

    We have some EM-administrators with two email adresses:
    -the first is a normal address for a long format e-mail messages;
    -the second is common address of SMS-gate SW (!! mail need to be parsed for getting it "TO", "SUBJ" and "BODY" headers !! ).
    We need to make EM to put the the first address as "TO"-header and second e-mail addres as "CC"-header, respectively.

    Yes, are correct - but as I mentioned before: there is no "cc"-functionality in GridControl...
    If you have the choice to specify additional e-mail addresses maybe you could implement your special logic (SMS-gate SW => !! mail need to be parsed for getting it "TO", "SUBJ" and "BODY" headers !! ) in the e-mail server itself...
    Or if you have the availability to send the e-mails of the notifications to the monitored host itself, you could "process" those e-mails and send them
    afterwards to the cc-recipients...

  • How to send mail notification with envrionment details

    Hi,
    I set up email notifications once the ODI task completed. Its working fine, but I want notifies email with environment details, i.e. master rep name, work rep name, and host name details.
    Is it possible? If yes please tell me how to do?
    Thanks in advance.

    Hi Mani,
    You can check out the ODIref functions in the Expression editor (in refresh tab of variable ).
    Please search there, it will be usefull to you.
    Thanks
    Madha

  • Sending Workflow notification with OAF page link through PL/SQL

    Hi Workflow Experts
    I have a requirement where I want to send a FYI notification to a user.
    And I have to add a link to my OAF screen in this workflow notification.
    Please let me know if i have to create a workflow for this or can this be done by calling some workflow api.
    Thanks in advance
    Navneet
    Edited by: Navneet01 on Feb 20, 2013 10:59 PM

    Try by defining the message attribute holding the link to the framework region. Then, once the notification has been created (sent) call WF_NOTIFICATIONS.SetAttrText to set the value of the region in that attribute value.
    Regards,
    Alejandro

  • Sending email Notifications from BPM 11.1.1.5+FP

    Hi all,
    We're trying to send an email notifications from our process but we need to send HTML mails, not just plain text...
    Any help would be appreciated.
    Thanks in advance

    1. Configure the UMS Email Driver in Enterprise manager
    2. onfigure the SOA Suite Workflow Notification properties
    3. Restart the soa server
    4. On the BPM Process, drag the mail notification from the notification category.
    5. update the mail notification properties such as to address, title, and content etc.
    For the configuration, please refer the following url
    http://technology.amis.nl/blog/6019/configure-soa-suite-11g-for-sending-email-notifications-with-google-mail

  • My application stopped sending push notification in ios7

    The application worked perfectly sending Push Notification with IOS6 did update the Mavericks for Developers and XCode and stopped working. You experienced it?

    Same here~~~ is there any fix for this issue?

  • Send email notification including file name and description, when users upload files to particular sub-folders?

    In my site collection i have a document library and document library has customer folder, each Customer folder has 4 sub-folders. i want to send email notification with file name and description to group and users, if they upload any files to Particular
    folder name "Final" not others 3 folders. would it possible to accomplish this solution? if yes please suggest which way i can do that. 
    Note: we have different groups of people, for example Team A and Team B. if files uploaded by any member of Team A, notification should sent to only Team A and specific people not Team B.
    Thanks in advanced for any help!

    Hey Rakib,
    You can add your group and those other people in To field of send mail activity. Have below snapshot for your reference.
    If Current Item URL Contains FolderName (i.e. Final) & Is Current User a member of of Team A
    Send Email to Team A; People1; People2;
    Thanks. Please mark as an answer if it helps.

  • Abap cod e required  for  send an email with specific template

    hi guru's
    i want to send an email with specific template ,which contain some email links in the body of the email,and some of the font will be in different colour
    i want load the template it in to abap program as it is.is this possible. please let me know.
    where can i maintain the template,

    hello
    check this may help u
    TABLES: ekko.
    PARAMETERS: p_email TYPE somlreci1-receiver
    DEFAULT 'xyzlive.com'.
    TYPES: BEGIN OF t_ekpo,
    ebeln TYPE ekpo-ebeln,
    ebelp TYPE ekpo-ebelp,
    aedat TYPE ekpo-aedat,
    matnr TYPE ekpo-matnr,
    END OF t_ekpo.
    DATA: it_ekpo TYPE STANDARD TABLE OF t_ekpo INITIAL SIZE 0,
    wa_ekpo TYPE t_ekpo.
    TYPES: BEGIN OF t_charekpo,
    ebeln(10) TYPE c,
    ebelp(5) TYPE c,
    aedat(8) TYPE c,
    matnr(18) TYPE c,
    END OF t_charekpo.
    DATA: wa_charekpo TYPE t_charekpo.
    DATA: it_message TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
    WITH HEADER LINE.
    DATA: it_attach TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
    WITH HEADER LINE.
    DATA: t_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
    t_contents LIKE solisti1 OCCURS 0 WITH HEADER LINE,
    t_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
    t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE,
    t_object_header LIKE solisti1 OCCURS 0 WITH HEADER LINE,
    w_cnt TYPE i,
    w_sent_all(1) TYPE c,
    w_doc_data LIKE sodocchgi1,
    gd_error TYPE sy-subrc,
    gd_reciever TYPE sy-subrc.
    *START_OF_SELECTION
    START-OF-SELECTION.
    *Retrieve sample data from table ekpo
    PERFORM data_retrieval.
    *Populate table with detaisl to be entered into .xls file
    PERFORM build_xls_data_table.
    *END-OF-SELECTION
    END-OF-SELECTION.
    *Populate message body text
    perform populate_email_message_body.
    *Send file by email as .xls speadsheet
    PERFORM send_file_as_email_attachment
    tables it_message
    it_attach
    using p_email
    'Example .xls documnet attachment'
    'XLS'
    'filename'
    changing gd_error
    gd_reciever.
    *Instructs mail send program for SAPCONNECT to send email(rsconn01)
    PERFORM initiate_mail_execute_program.
    *& Form DATA_RETRIEVAL
    *Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
    SELECT ebeln ebelp aedat matnr
    UP TO 10 ROWS
    FROM ekpo
    INTO TABLE it_ekpo.
    ENDFORM. " DATA_RETRIEVAL
    *& Form BUILD_XLS_DATA_TABLE
    Build data table for .xls document
    FORM build_xls_data_table.
    CONSTANTS: con_cret TYPE x VALUE '0D', "OK for non Unicode
    con_tab TYPE x VALUE '09'. "OK for non Unicode
    *If you have Unicode check active in program attributes thnen you will
    *need to declare constants as follows
    *class cl_abap_char_utilities definition load.
    *constants:
    con_tab type c value cl_abap_char_utilities=>HORIZONTAL_TAB,
    con_cret type c value cl_abap_char_utilities=>CR_LF.
    CONCATENATE 'EBELN' 'EBELP' 'AEDAT' 'MATNR'
    INTO it_attach SEPARATED BY con_tab.
    CONCATENATE con_cret it_attach INTO it_attach.
    APPEND it_attach.
    LOOP AT it_ekpo INTO wa_charekpo.
    CONCATENATE wa_charekpo-ebeln wa_charekpo-ebelp
    wa_charekpo-aedat wa_charekpo-matnr
    INTO it_attach SEPARATED BY con_tab.
    CONCATENATE con_cret it_attach INTO it_attach.
    APPEND it_attach.
    ENDLOOP.
    ENDFORM. " BUILD_XLS_DATA_TABLE
    *& Form SEND_FILE_AS_EMAIL_ATTACHMENT
    Send email
    FORM send_file_as_email_attachment tables pit_message
    pit_attach
    using p_email
    p_mtitle
    p_format
    p_filename
    p_attdescription
    p_sender_address
    p_sender_addres_type
    changing p_error
    p_reciever.
    DATA: ld_error TYPE sy-subrc,
    ld_reciever TYPE sy-subrc,
    ld_mtitle LIKE sodocchgi1-obj_descr,
    ld_email LIKE somlreci1-receiver,
    ld_format TYPE so_obj_tp ,
    ld_attdescription TYPE so_obj_nam ,
    ld_attfilename TYPE so_obj_des ,
    ld_sender_address LIKE soextreci1-receiver,
    ld_sender_address_type LIKE soextreci1-adr_typ,
    ld_receiver LIKE sy-subrc.
    ld_email = p_email.
    ld_mtitle = p_mtitle.
    ld_format = p_format.
    ld_attdescription = p_attdescription.
    ld_attfilename = p_filename.
    ld_sender_address = p_sender_address.
    ld_sender_address_type = p_sender_addres_type.
    Fill the document data.
    w_doc_data-doc_size = 1.
    Populate the subject/generic message attributes
    w_doc_data-obj_langu = sy-langu.
    w_doc_data-obj_name = 'SAPRPT'.
    w_doc_data-obj_descr = ld_mtitle .
    w_doc_data-sensitivty = 'F'.
    Fill the document data and get size of attachment
    CLEAR w_doc_data.
    READ TABLE it_attach INDEX w_cnt.
    w_doc_data-doc_size =
    ( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
    w_doc_data-obj_langu = sy-langu.
    w_doc_data-obj_name = 'SAPRPT'.
    w_doc_data-obj_descr = ld_mtitle.
    w_doc_data-sensitivty = 'F'.
    CLEAR t_attachment.
    REFRESH t_attachment.
    t_attachment] = pit_attach[.
    Describe the body of the message
    CLEAR t_packing_list.
    REFRESH t_packing_list.
    t_packing_list-transf_bin = space.
    t_packing_list-head_start = 1.
    t_packing_list-head_num = 0.
    t_packing_list-body_start = 1.
    DESCRIBE TABLE it_message LINES t_packing_list-body_num.
    t_packing_list-doc_type = 'RAW'.
    APPEND t_packing_list.
    Create attachment notification
    t_packing_list-transf_bin = 'X'.
    t_packing_list-head_start = 1.
    t_packing_list-head_num = 1.
    t_packing_list-body_start = 1.
    DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
    t_packing_list-doc_type = ld_format.
    t_packing_list-obj_descr = ld_attdescription.
    t_packing_list-obj_name = ld_attfilename.
    t_packing_list-doc_size = t_packing_list-body_num * 255.
    APPEND t_packing_list.
    Add the recipients email address
    CLEAR t_receivers.
    REFRESH t_receivers.
    t_receivers-receiver = ld_email.
    t_receivers-rec_type = 'U'.
    t_receivers-com_type = 'INT'.
    t_receivers-notif_del = 'X'.
    t_receivers-notif_ndel = 'X'.
    APPEND t_receivers.
    CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
    EXPORTING
    document_data = w_doc_data
    put_in_outbox = 'X'
    sender_address = ld_sender_address
    sender_address_type = ld_sender_address_type
    commit_work = 'X'
    IMPORTING
    sent_to_all = w_sent_all
    TABLES
    packing_list = t_packing_list
    contents_bin = t_attachment
    contents_txt = it_message
    receivers = t_receivers
    EXCEPTIONS
    too_many_receivers = 1
    document_not_sent = 2
    document_type_not_exist = 3
    operation_no_authorization = 4
    parameter_error = 5
    x_error = 6
    enqueue_error = 7
    OTHERS = 8.
    Populate zerror return code
    ld_error = sy-subrc.
    Populate zreceiver return code
    LOOP AT t_receivers.
    ld_receiver = t_receivers-retrn_code.
    ENDLOOP.
    ENDFORM.
    *& Form INITIATE_MAIL_EXECUTE_PROGRAM
    Instructs mail send program for SAPCONNECT to send email.
    FORM initiate_mail_execute_program.
    WAIT UP TO 2 SECONDS.
    SUBMIT rsconn01 WITH mode = 'INT'
    WITH output = 'X'
    AND RETURN.
    ENDFORM. " INITIATE_MAIL_EXECUTE_PROGRAM
    *& Form POPULATE_EMAIL_MESSAGE_BODY
    Populate message body text
    form populate_email_message_body.
    REFRESH it_message.
    it_message = 'Please find attached a list test ekpo records'.
    APPEND it_message.
    endform. " POPULATE_EMAIL_MESSAGE_BODY
    Thank u,
    santhosh

  • Sending notifications with attachments using RSWUWFML2

    Hi,
    I need to send a notification for a Workitem that has been forwarded. The workitem includes an attachment object type SOFM in element attachobjects. The report is creating the Email text but does not include the attachment. Does anybody have any ideas how I can create the Email with the attachment included for forwarded items.
    Regards
    Kevin Peyton

    Hi,
    In this program RSWUWFML2 you have to select the Radio Button ' One Message per Work Item' then select the below Check boxes
    Workflow Entry
    Work Item Display
    Work Item Execution
    Then execute it, then in the email link to workitem object will come as an attachment. Once you click, it will ask for the user name and password, after entering those you can execute the workitem. Check this [link|https://wiki.sdn.sap.com/wiki/x/moH8B].
    Regards,
    Surjith

  • [SOLVED] Actions in notifications with notify-send

    Using notify-send, is there a way to associate a notification with some action (e.g. execution of a script) when clicking on it? Or is it possible to include a button within the notification? To better understand what I mean, please have a look the below image depicting a notification sent by Rhythmbox that contains some buttons.
    Last edited by ibes (2013-11-16 08:00:58)

    You might be interested in "dunstify" which is a part of the dunst daemon, but is not installed with the AUR package. It is a more fleshed out interface for libnotify than notify-send.
    dunstify -A yes,ACCEPT -A no,DECLINE "Call waiting"
    https://github.com/knopwob/dunst
    Last edited by progandy (2013-11-15 21:31:33)

  • Requirement to send notification with attachment

    Hi
    I have a requirement from our Payroll department whereby I need to create a output file per cost centre and send a notification to the manager with a PDF file attach. This PDF file would contain all employee's paydata.
    I did manage to load the data into a file as a BLOB.
    How do I now add this pdf file to the notification?
    The problem is it should be a notification and not in an email as the email in not secure enough to distribute payroll data.
    Regards
    Johann

    You will either have to send a link (Generated Programmatically from a Function) in the Notification or use the DOCUMENT capability in WF.  An example can be found in POAPPRV on the request approval notification.  The notification itself sends only the first 5 lines of a PO, but there is a document which will display everything.  The Document is basically a PL/SQL function that generates a Text and/or HTML output generated by your code.
    There is not an attach file to a Notification capability

  • Send email notification when a concurrent request completes with Error

    {color:#0000ff}I need to setup the system such that when a concurrent request completes with the status "Error", generate/send email notification to an application user. Please advice if you know how to configure the system to accomplish this.
    Note: If the concurrent request completes with status "Normal" or "Warning", do not send/generate email notification to the application user.
    Thanks.
    {color}

    We do what amOx does. I made a concurrent program that calls a sql script, and emails me of errored jobs. It is more convenient than logging in each day. I ran this twice daily, and the sql checks for the previous 12 hour time slice (ie - twice a day run).
    ..colin

Maybe you are looking for

  • Report on 1 Page

    Hello, I know my report size are link to the paper size set on my spool. How I can create a huge sheet (3m by 3m) not to be print, but only to ensure that user can see data in one page and not navigate ? Thanks in advance Alex

  • ICal Alarm Editing Bug, not fixed yet in 10.5.3?

    Hi All Mac users, I have noticed this bug for quite a long while, which I cannot remember from when, but I think it was from around 10.3 or 10.4. I am used to it, and can deal with this since I know it. But, it still seems to persist even after updat

  • Function and Mouse Shortcut Keys for Exposé Reset Frequently

    I have been noticing, recently, that my keyboard and mouse shortcuts for exposé and dashboard reset almost every day. It happens most frequently after I run World of Warcraft or fullscreen with VLC (which I have set to use the first 5 function keys b

  • How do i upgrade from Garageband 5.0 to 6

    How do i upgrade from Garageband 5.0 to 6

  • Legal Consolidation problem

    Hi Experts , Couple of days before , we restored the appset in the our development server . After we did the procees all the dimensions and optimization all the application . When i runned the legal consoldation , its running but no effect in the dat