You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I tried a few things, but no luck.
By RemoteID, I mean, Universal Dismiss. I didn't find any DOC also, just the MSDN article talking about it.
Any help would be appreciated.
Where I want to implement it:
foreach(Tuple<string, string, string> newNote in newNotifications)
{
// Make the visual
ToastVisual visual = new ToastVisual();
visual.TitleText = new ToastText() { Text = newNote.Item1 };
if(!String.IsNullOrWhiteSpace(newNote.Item2))
{
visual.BodyTextLine1 = new ToastText() { Text = newNote.Item2 };
}
// Make the toast content
ToastContent toastContent = new ToastContent();
toastContent.Visual = visual;
toastContent.Launch = c_messageInboxOpenArgument;
toastContent.ActivationType = ToastActivationType.Foreground;
toastContent.Duration = ToastDuration.Short;
var toast = new ToastNotification(toastContent.GetXml());
toast.Tag = newNote.Item3;
// Only show if we should and this is the first message to show.
toast.SuppressPopup = hasShownNote || updateSliently || AddToNotificationCenterSilently;
ToastNotificationManager.CreateToastNotifier().Show(toast);
// Mark that we have shown one.
hasShownNote = true;
}
So you added the RemoteId, installed the app on both your phone and PC, and popped the notification with the same RemoteId? And you're logged into Cortana with your MSA on both of your devices? And when you dismissed one, the other didn't dismiss?
I'm on 14393 with 14388 SDK. And the problem here is that it doesn't recognize account and homework. "The name 'account' does not exist in the current context".
Also tried following this method but not luck too. :/
Oh, "account" and "homework" are local variables to my own app... you'll have to generate your own RemoteId string using variables that make sense to your app.
What are you sending a notification for? If you tell me what you're sending a notification about, I could help suggest what you should use to generate your RemoteId!
Sorry I forgot to reply, if you haven't figured out what to do for the RemoteId, I just took a look at that code and here's my suggestion...
Is "message.Id" something that is consistent across devices? For example, is the "Id" property something that the Reddit server provides? And therefore the message ID for a message will be the same on two different devices?
If so, you should use that for the RemoteId (you already use it for Tag, you can use it for RemoteId too).
So at line #213, I would do
toast.RemoteId = "Message_" + newNote.Item3;
And that should work, assuming that the message ID is something that's shared across devices and therefore can identify the same message across devices.
Activity
andrewleader commentedon Aug 1, 2016
Hey! You're correct that the latest documentation is the MSDN blog article: https://blogs.msdn.microsoft.com/tiles_and_toasts/2016/06/10/action-center-in-the-cloud-universal-dismiss/
So you added the RemoteId, installed the app on both your phone and PC, and popped the notification with the same RemoteId? And you're logged into Cortana with your MSA on both of your devices? And when you dismissed one, the other didn't dismiss?
What build are you on?
vitordelucca commentedon Aug 1, 2016
I'm on 14393 with 14388 SDK. And the problem here is that it doesn't recognize account and homework. "The name 'account' does not exist in the current context".
Also tried following this method but not luck too. :/
andrewleader commentedon Aug 4, 2016
Oh, "account" and "homework" are local variables to my own app... you'll have to generate your own RemoteId string using variables that make sense to your app.
What are you sending a notification for? If you tell me what you're sending a notification about, I could help suggest what you should use to generate your RemoteId!
vitordelucca commentedon Aug 4, 2016
I'm sending a pull toast (timer, check every 15 min). It's Reddunt app, Baconit fork :)
https://github.com/vitorgrs/Reddunt/blob/rd_develop_rs1/BaconBackend/Managers/Background/BackgroundMessageUpdater.cs
andrewleader commentedon Aug 17, 2016
Ah I saw Reddunt on the WindowsPhone subreddit :P
Sorry I forgot to reply, if you haven't figured out what to do for the RemoteId, I just took a look at that code and here's my suggestion...
Is "message.Id" something that is consistent across devices? For example, is the "Id" property something that the Reddit server provides? And therefore the message ID for a message will be the same on two different devices?
If so, you should use that for the RemoteId (you already use it for Tag, you can use it for RemoteId too).
So at line #213, I would do
And that should work, assuming that the message ID is something that's shared across devices and therefore can identify the same message across devices.