Send both Toast and Tile Notification simultaneously using Template feature of Notification Hub

Hi, I am using WNS(Windows Notification Service) With Notification Hub to send Push Notifications to my WP 8.1 Application. I am basically sending localized notification using Template feature of Notification Hub. I have used Localized
News example  reference for sending localized used.
Here are my templates and how I am registering them, also How my Dictionary payloads look like :-
Toast Template Method :- 
public static string GetToastText01Template(string param,string line1)
return string.Format(@"<toast launch=""$({0})"">
<visual>
<binding template=""ToastText01"">
<text id=""1"">$({1})</text>
</binding>
</visual>
</toast>", param, line1);
Tile Template Method :-
public static string CreateSquare150_150BackgroundTextTemplateWns(string backText)
return string.Format(@"<tile>
<visual >
<binding template=""TileSquarePeekImageAndText01"">
<image id=""1"" src=""ms-appx:///ApplicationIcon_173_173.png"" alt=""alt text"" />
<text id=""1"">$({0})</text>
</binding>
</visual>
</tile>", backText);
Registration With Notificaiton Hub (Part of Register Method basically) :-
var toasttemplate = GetToastText01Template("NavigateToPageUri" ,GetToastCultureKey(culture));
await _hubClient.CreateWindowsTemplateRegistrationAsync(ChannelUri, toasttemplate, tags);
var tileTemplate = ToastFactory.CreateSquare150_150BackgroundTextTemplateWns(GetTileBackTextCultureKey(culture));
await _hubClient.CreateWindowsTemplateRegistrationAsync(ChannelUri, tileTemplate, tags)
Toast payload In terms of Dictionary :- 
Tile Payload Dictionary :-
Note :- I have ensured that Keys for both the templates must be different during registering the templates so that both templates doesn't mix with each other. 
Problem :- When I am registering only one Template, doesn't matter Whether it is Toast or Tile, I am able to get the notification on my app successfully(Both of Toast and Tile ,individually, working fine). But When I register both of the
Templates simultaneously or Individually, then none on them is working.
Questions :- 
1) Can you let me know how basically Notification Hub select the Template from Payload Dictionary ? Like in case of two different registered templates.
2) How can we send Two localized Notifications simultaneously using Template feature of Notification Hub?

Hi Tanuj,
Selection of template/registration always based on tags not based on payload keys.
Just to explain, you have following two devices.
device A - toast template,  tags: {"en-us", "toast"}
device A - tile template , tags : {"en-us", "tile"}
device B - toast template,  tags: {"en-fr", "toast"}
device B - tile template , tags : {"en-fr", "tile"}
If you call a method  SendTemplateNotificationAsync({“properties of template”}, “en-us”)) like this,  That will target the toast and tile both notifications to the device A.
But if you just want to send the toast notification to device A, you have to call something like this,
SendTemplateNotificationAsync({“properties of template”}, “en-us && toast”)). FYI Second parameter is a tag expression: Please refer following link to know more about tag expressions:
https://msdn.microsoft.com/en-us/library/azure/dn530749.aspx
To answer your second question, register template with language tag along with other tags (just like above example). Then when you are sending notification, include that tag in your tag expression.
Example: SendTemplateNotificationAsync({“properties of template”}, “en-us && toast”)), this one send toast notifications to all “en-us” local devices.
Thanks,
Sateesh
Mark Post as helpful if it provides any help.Otherwise,leave it as it is.

Similar Messages

  • 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.

  • I am trying to detect signal peaks (derivatives of the peaks both +ve and -ve peaks). simultaneously 2 peaks detectors are running, 1 for +ve and other for -ve peaks.

    i am trying to detect signal peaks (derivatives of the peaks both +ve and -ve peaks). simultaneously 2 peaks detectors are running, 1 for +ve and other for -ve peaks. when a peaks get detected it would trigger a pulse of approx 1 sec duration and at the same time it would disable the other peak detector for 1 sec time duration. after the time period, again both the peak detectors would be enabled. i have been able to detect both peaks but still not able to control the detectors block the way mentioned before.
    the code and the data are attached.
    Attachments:
    eog peak detection.vi ‏192 KB

    I'm not suggesting any of this as a model, and your needs are different than mine.
    1) Go to Preferences -> Audio.  Under "Default Audio Tracks", Set "Mono Media: Mono".  Set "Stereo Media: Mono"  (Choices from the pull-down for both are Use File, Mono, Stereo, 5.1, Adaptive)
    You can change these, but I don't. I am using both mono and stereo tracks. I set up a custom sequence with the particular combination of stereo and mono tracks I want.
    2) Set audio for clips by selecting all clips and going to Modify Clip -> Audio Channels Tab.  Under "Number of Audio Tracks" there should be a "1".  Under Channel Format it should read "Stereo".
    I am not sending the audio to anyone else to edit further. I am doing a final stereo mix. If camera one is set up to record 2 mikes as a stereo track, then I leave that unchanged and put it onto a stereo track. If camera two is set up to record one mike onto channel 1 as ambient sound and channel 2 is a mono feed from a sound board, then I modify those clips as Preset Mono, 2 audio tracks, Channel format Mono, and that puts the left source channel (or whichever I choose) onto Audio track 1, channel 1 (of one), and right source channel onto audio track 2, channel 1.
    4) Delete all the existing audio tracks in the sequence and replace them all with mono tracks, so all tracks in the sequence are mono.
    I modify the tracks while creating the sequence, and ultimately use a custom sequence.
    Under my Effects Controls panel there is only Channel Volume, and nowhere to adjust the pan.
    I'm using the mixer, not the effects control panel.

  • I cannot get my bookmarks and reading lists to sync over my devices.  I've checked the iCloud settings on both devices and still nothing.  Using a retina iPad and a new mac book pro

    I cannot get my bookmarks and reading lists to sync over my devices.  I've checked the iCloud settings on both devices and still nothing.  Using a retina iPad and a new mac book pro

    Welcome to the Apple Community.
    In order to change your Apple ID or password for your iCloud account on your iOS device, you need to delete the account from your iOS device first, then add it back using your updated details. (Settings > iCloud, scroll down and hit "Delete Account")
    In order to change your Apple ID or password for your iTunes account on your iOS device, you need to sign out from your iOS device first, then sign back in using your updated details. (Settings > store, scroll down and tap your ID)

  • How 2 create coloumns and rows in smartforms using template????

    How to create coloumns and rows in smartforms using template????...
    Kindly explain in details.......
    Regards,
    Faiz
    Moderator message: please search for available information.
    Edited by: Thomas Zloch on Mar 5, 2012

    Hi JV,
    Yes you can create rows dynamically in a table in IF. You can follow the instruction in [this link|Re: Dynamic Table -  same data repeating in all rows] to create the dynamic table.
    Also refer to these links:
    [Data in dynamic table not pass to webdynpro java|https://forums.sdn.sap.com/click.jspa?searchID=16436680&messageID=5638776]
    [DYNAMIC TABLE IN WEBDYNPRO INTERACTIVE FORM|https://forums.sdn.sap.com/click.jspa?searchID=16436680&messageID=5775811]
    Hope this helps!!
    Regards,
    Arafat

  • Is it mandatory to send both old and new entity type in case of update procedure?

    Hi,
    While updating an entity, is it mandatory to send both the new entity and the old entity from the exit to the procedure?
    In that case we would have to create 2 temporary tables, insert values into them and then pass the tables to the procedure? Or is there a better way?

    Hi Ken,
    I have followed the instructions on several sites on how to setup using facelets.VIEW_MAPPINGS to use both legacy JSPs and new xhtml files.
    My Web.xml now looks like
    <web-app>
        <context-param>
            <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
             <param-value>.jsp</param-value>
        </context-param>
        <context-param>
                <param-name>facelets.VIEW_MAPPINGS</param-name>
                <param-value>*.xhtml</param-value>
        </context-param>
        <!-- Faces Servlet -->
        <servlet>
            <servlet-name>Faces Servlet</servlet-name>
            <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
            <load-on-startup> 1 </load-on-startup>
        </servlet>
        <!-- Faces Servlet Mapping -->
        <servlet-mapping>
            <servlet-name>Faces Servlet</servlet-name>
            <url-pattern>*.jsf</url-pattern>
        </servlet-mapping>
        <welcome-file-list>
            <welcome-file>index.jsp</welcome-file>
        </welcome-file-list>
    </web-app>
    and my faces-config looks like
    <faces-config>
        <application>
          <!-- tell JSF to use Facelets -->
          <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
        </application>
    </faces-config>I have 2 files index.jsp AND guess.xhtml in my apps root directory.
    what should my different requests look like in order to access these two resources?
    http://localhost/myApp/???
    I have also followed the instructions on the following page but still getting resource not available errors
    http://www.mojavelinux.com/blog/archives/2006/12/partial_facelets_adoption/
    Edited by: JFrain2004 on Jan 30, 2008 8:56 AM

  • Both iPad and iPhone Mail Crash Using Certain Letters in "To" Field

    Here is a peculiar mail crashing problem, and it is happening on both an iphone 4s and the newest ipad. Mail works on both, but on both devices when a new message is created and you go to type in the "To" field, clicking first on the letters s, g, j and f makes mail crash. All other letters work fine. If you press "s" twice quickly, both letters show up and don't crash mail, but if you delete the second "s", mail crashes. Again, this is true on both devices. A hard reset was performed on the ipad to no avail. Thinking there might be a bad app, each app was deleted one at a time on the ipad with trying mail after each deletion: no luck. Again on the ipad mail accounts and messages were deleted: no luck. In the end a full reset of the ipad was performed: still no luck.
    This all started happening about two weeks ago, right around the time of the 6.1 update. That might be the problem, but others with 6.1 don't seem to have this problem. Seems like both devices would have in common apps, email messages, and os 6.1. Kind of feel like apps and email were checked out fairly thoroughly with no clues. The keys here are that it is happening on both devices, and on both it is the same 4 letters that make mail crash. Would love advice.

    I actually have the same problem when I type the letter 'j'...and it started with the latest update.
    I would love to hear of any possible solutions.
    Thanks in advance,
    Jay

  • BB Torch stopped recieving and sending both emails and BBM

    I can't send or recieve since mid this afternoon.
    Everthing else seems to be working: Text messages work as does the internet browser
    I can access the appp world too
    Is the mail server down? or is this just my phone?

    Hi boxster
    First perform a Battery pull restart by removing the Battery while your device is Powered On , after reboot try those steps in a sequence :
    1- Register your Handheld .
    KB00510 How to register a BlackBerry smartphone with the wireless network
    Wait till a Registration messages comes in your message box.
    2- Resend your Service Book
    KB02830 Send the service books for the BlackBerry Internet Service
    ( Wait till a Registration message comes in your message box for each email you have configured )
    3-  Then perform a battery pull restart like this while the device is powered On remove your battery wait for a min. then reinsert it back 
    Try those steps  and if you are unable to recieve any registration messages then you may have to call your Carrier regarding this issue.
    Click " Like " if you want to Thank someone.
    If Problem Resolves mark the post(s) as " Solution ", so that other can make use of it.

  • Help With Recording both Microphone and Audio Playback Simultaneously

    I am trying to record both my own microphone and another audio source at the same time. The other source is a VOIP program. When I try to set up a multitrack session I can only select either my Microphone or The sound card as my input for the tracks. When I try to set up one and then the other, I have to change my default input device from the audio hardware settings which then excludes the other device from being used. I am following the steps in these two videos here:
    http://www.youtube.com/watch?v=TAJ9rXepKZc
    and
    http://www.youtube.com/watch?v=TAJ9rXepKZc
    Thank you for your help.

    Since Audition inherently uses ASIO, the windows driver you see in the hardware setup is translating the built-in driver information (not ASIO) to this standard. The ASIO4ALL driver, which you can download for free, has some advantages in this regard; it will let you see all of the devices connected to your system with valid windows drivers and possibly let you connect more than one at a time - although I'm not promising that this will work... (although it seemed to in the video)
    The thing you have to understand about ASIO is that it bypasses a lot of the OS, and inherently will only ever work with one device at a time. Fortunately, ASIO4ALL counts as a single device, and to that extent, Audition doesn't care what's connected to it. You may yet run into difficulty though, because your mic and Windows internal hardware aren't synced together, and ASIO4ALL may regard this as an insuperable problem. The reason that I think it might work though is that your mic is a USB device, and the drivers for this are a little different. Normally we regard USB mics as being a right PITA, but in this case it might be your saving grace - I don't know.
    The usual solution to this problem is to use an external sound device with more than just single inputs and outputs, and with an ASIO driver. This method doesn't use 'what you hear' at all, but routes the software feed from your VOIP package straight to one output, which you feed to a small external mixer. Into the mixer, you plug your external mic as well. The mixer output goes to another pair of inputs on your sound device, and this is what you record in Audition, generally you on one channel and the incoming caller on another (or you can use a stereo pair split left and right). The advantage of this is that you can monitor the call on the mixer, and once you have the levels set about right, just concentrate on the call - final level tweaking, which is invariably needed, is easy, because you've kept both sides of the converstation on different tracks.

  • Send out analog and digital signal simultaneously ?

    Is there any way to send out an analog signal and a digital signal at
    the same time? Time is critical in my application. Milisecond delay is
    not allowed. I am using a PCI-MIO-16E-4 board and DAQ 6.0.
    Any information from you will be deeply appreciated.
    Sent via Deja.com http://www.deja.com/
    Share what you know. Learn what you don't.

    You went a little too far. the while loop I was talking about was the one around the digital write. You've now taken the digital write completely out of the loop and closing it. You can't do anything with the digital when the analog in is running. You've also closed the analog write while the analog in is running. The attached is more like what I was talking about.
    Even with the diagram cleaned up, it sounds like you still have a problem. I don't know the details of your hardware setup but I would start by looking at the analog signal you are generating and verifying that it is correct to your hardware. It would help if you had a scope to troubleshoot. If the signal is correct to the hardware, then trace it through to the connection to the DAQ's analog input. If it's correct there and you still don't see the signal, then you may have wired up the DAQ incorrectly. You haven't specified the connection type (differential, RSE, etc) and I believe it will default to differential.
    Attachments:
    Single Channelv 2_mod.vi ‏535 KB

  • With newer MacBook Air, sending both video and audio to an LG TV works fine, but I want to send the audio to a sound bar attached to the TV.  Any way to do this?

    I am trying to get audio to play through the soundbar attached to the TV for great sound.  Works fine with Apple TV, but on the MacBook Air, system preferences will only find the TV speakers.  If I change the settings on the TV to external speakers (the soundbar), then I get no sound at all.  The HDMI connection does what it is supposed to do, providing video and audio, but the audio can only go to the TV.  I don't know if you can go backward and send only video through HDMI and then connect to the soundbar through the mini jack ports on the computer and the soundbar.  Any solutions will be appreciated.

    its important to do this in the correct order so the camera will be senced by the Mac and to prevent the Firewire connection from electrical damage:
    power down your Mac
    connect firewire from camera to Mac
    power on camera and insert tape in camera and play back
    power up Mac
    start QuickTime
    File > Preferences > record tab
    video source - select the camera you have
    sound source - select the camera you have
    quality - select device native
    the video should show in the QuicTime window
    a  green line below video will show presence of sound-it will play through the speakers if they are selected in system prefernces
    rewind tape and playback
    click on red button to start recording

  • AppleTV to both HDMI and AirPlay speakers simultaneously

    I have an AppleTV connected to home theater receiver via HDMI. I want to add wireless airplay speakers so I can send audio to them as we'll as through the stereo simultaneously. Will this work?
    Steve

    vazandrew wrote:
    That is for controlling through iTunes. You can't output to multiple speakers from Apple TV
    That was my understanding too.

  • Video playback very slow/failing with both iGPU and dGPU enabled simultaneously

    Until a couple of months ago, my PC was running with an i5 760 and my current Radeon HD 7850 on Premiere Elements 11 just fine - playback was smooth and I could edit my videos just fine.
    However, recently I installed a new CPU and motherboard - an i7 4770K. The key feature here is that it has an integrated GPU (hence referred to as "iGPU") which can run in tandem with my current dGPU (discrete GPU, the HD 7850) by having encoding jobs such as rendering videos and transcoding sent to the iGPU in a feature called Quick Sync. In order to utilise this, I had to bind a virtual monitor to my motherboard's VGA port (as according to this post made by vaesauce on the OBS forums), and for all related applications it worked perfectly (HandBrake transcodes really quickly, and I can stream with OBS with negligible performance overhead). Except one - Premiere Elements 11.
    When I booted up Premiere Elements 11 to edit a short clip yesterday, I was greeted with a screen that informed me I had incompatible drivers. I went and checked my video drivers for both of my GPUs - both up to date - reinstalled them and rebooted. Tried once again, same issue. Going on to try and edit just resulted in audio playback, and a complete failure of video playback. I found the solution was to disable my iGPU in device manager, then it works fine.
    Now, here is my question - how can I have both the dGPU and iGPU enabled and still be able to edit videos with Premiere Elements 11? While it does work in this fashion, the constant going into device manager before and after editing a video is very annoying (also, I'm sure PrEl 11 could itself benefit from the QuickSync!)

    Don't disable the Intel GPU. Causes more problems then it fixes. Here's your solution believe it or not. Go to download.com and find the K-Lite Codec Pack_Full and install. It seems that the new updates have been messing peoples system's ability to read Codecs. This fixed my problem and I've been searching all day every day for over a week now.

  • I can not open at my IMAC 5 the files saved at my PC . In Both PC and IMAC i am using CS6 . why is heppining this ?

    Olá
    Comprei um IMAC e fui transferir meus trabalhos do meu PC para ele. eu tenho nos dois computadores tenho CS6 instalado e licenciado. Não foi possível abrir no IMAC 5 os arquivos salvos no pC . O que está acontecendo? Alguém poderia me ajudar ? Obrigado
    Hello
    Bought an IMAC and was transfer my work from my PC to it. I have the two computers I have installed and licensed CS6. Could not open in IMAC 5 files saved in pC. What is happening? Could anyone help me? Thank you

    The files are the same, regardless of platform.
    So something went wrong in transferring the files.

  • Spent thousands of dollars and can't even use basic features

    MacBook Pro - $2000
    iPhone - $800
    Apple TV - $100
    What the **** is going on with Apple?
    I can't sync my iPhone and MacBook Pro. Sometimes is discovers both devices but then fails to sync. Other times neither recognises each other even when they're both in the list. As part of Mavericks, I'm supposed to be able to share Maps with other devices, but it won't recognise my iPhone. Why the **** did I spend nearly three dollars on Apple products when I now have to go back to my PC for basic features. I've spent hours on the phone with Apple about problems, and while the service might be immediate and very couteous, most the time they don't understand what I'm talking about or they haven't got a solution. With thousands of features on the iPhone and Macbook Pro, I only wanna use about 2 dozen.
    Here's some of the things I don't even bother with now -
    iTunes - Can't delete recent plays, can't stop it playing from that same list the moment you plug it into a plug and play, so huge and cumbersome with too many features, but just try playing music only. I don't want album covers or info downloaded from the Net. I don't want all the songs segregated into albums and the like. I play songs and then try to find them in Recently Played and they're not even there, but songs I've play over a year ago and which I don't want arer still stubbornly there and can't be deleted. Media Player is the same. I'ma prefoessinal musician and sound engineer and I've never known anyone to have used more than 10% of the features in iTunes. Who the **** are the Apple tech heads developing products for? Scientific Audiologists? Pathetic program, don't even use nowadays, but it still has the ability of popping it's ugly head up from time to time.
    Audio - I run Logic Pro X and EVERYTIME I connect a new audio interface, I have to go to Preferences>Sound and change the Input and Output. EVERYTIME!!!!!!!!!! Sometimes when recording, I have to the correct the sound preferences 40 times a day, I've counted them on a number of occasions. Apple is meant to be THE audio expets and yet I'm back using Cubase on my PC or even sometimes having to go back to my old iMac and Logic Pro 9!! Along problems I'm experiencing with Logic Pro x, Apple now wants me to return my MacBook pro to them possibly for up to six weeks. This is after I've transferred my whole business on to the MacBook Pro and literally can't do without it.
    Contacts - they don't sync with iCloud, other devices, Skydrive or any other synced app, although, sometimes they do.
    The Dock - some of the Apps in the Dock when already opened won't open with a click or double click. I have to right click on the icon, Show All Windows and only then can I open the App. On my PC, I open all programs in "their dock" with one click.
    Let me explain what will happen now. Nothing. I can't afford to give my MacBook Pro to Apple to fix or even call them up again about these probs cause it takes HOURS and HOURS and HOURS and HOURS. Last time I rang them, it cost me about $300 in lost productivity.
    I think that when Steve Jobs passed away, Apple died along with him.
    I'm not an Appy Chappy ... pathetic

    Do you have a question?

Maybe you are looking for

  • A problem with args[i]

    Hi, I'm totally new to Java and I have a problem with my first program. It has to read the numbers from the input and checks wheter it is a prime number. This is what I have so far: public class PrimeNumbers public static boolean isPrime(int n) if (n

  • Map Webservice schema to actionscript bean?

    I used the wizard in flex builder to generate webservice proxy classes from a wsdl. The wizard created bean type classes from the wsdl schema. I already had model classes for my flex views/forms. I have to set different properties of these models dep

  • Power Supply Model Number

    My daughter somehow managed to wreck the power supply plug that came with her  HP 14-B031US Sleekbook laptop and she threw the power supply away. Can anybody supply me with the model number of your power supply so I know I'm going to get the correct

  • What ways of communication between two java apps you know?

    Hi all Lame (but not for me) question. I have two java applications (first is web-app unning on server (tomcat or JBoss) and second is a standalone java app). Both are running on different JVM and both have to communicate with each other quite often

  • How to create multiple SCO in Cap 3

    Hi all, just want to know if I can create a multiple SCOs in a single captivate file, for example, I want to create a help file around how to use a system, and within the course, there are 3 different topics that need to be split into 3 different SCO