Windows interactive notifications - windows

So I want to know how a quickreply toast can be sent to the right person and when you click on it, it goes to the specific person.
Example 1:
Person A texts me, I pull down on the interactive notification and type my response and it gets processed by the background process. How does the applications know that my response goes to Person A. is there an attribute in the XML of the toast that can be a variable, like the phone number?
Example 2:
Person A posts a picture on my facebook, I click on the notification and it takes me to the page on facebook. Again is there an XML variable with a URL of it or something?

You can download this Microsoft Windows UWP sample, where you can see what code they use to manage notifications.
I think that you need Toast notifications:
Toast notifications are small pop ups that appear on the screen for few seconds. They convey messages and can be customized to even play different sounds. New to Windows 10 are actionable toasts where a user has a choice to interact with the notifications by use of a button, for example.

Related

Slack-send message with notification but without popup

I chat with my boss through slack, he is always in meetings and so his screen is always shared with clients, so when I send a message, it will popup during a meeting and so it can be seen buy other persons.
This is OK most of the time, I don't care my professional messages being seen by others, but sometimes I want to tell him something more private and in that case I don't expect any popup.
Is there a way to send a message without popup? but just case by case, not always. It should not be silent, there must be the small red icon notification but no popup.
Any idea?
I found a workaround, send a message with minimal words for which you don't care, you collegue will get a popup, right after edit the message. The update does not popup

I can send Google Assistant messages to my windows application, but how do I send a message back?

I'm using IFTTT to send a Google Assistant message to my Windows application via Drop Box. If I say "[keyword] [message]" (for example: "Computer: Play Game of Thrones Season 2 Episode 4") IFTTT will write the text translation of [message] to a file on drop box that my application monitors and from there I can read the [message] and act on it.
What I would like to be able to do is send a reply back to the device that sent the message... For example if I tell my phone to have my computer start a movie on my computer and for whatever reason my app can't find the movie I want to be able to communicate that back to the device that originally sent the message, whether that be my cell phone or tablet or Google Home smart speaker.
I know there is probably no official way to do this but i'm looking for creative solutions (like the one I use to get the message in the first place)... anything at all that works even if it involves multiple third-party services.
There's no good way to send back an acknowledgement through the IFTTT integration. You'd need to build your own Action which would use something like push notifications to communicate between your local device and a cloud-based webhook.

Xamarin Forms - Navigation stack disrupted when send email

My cross-platform Xamarin Forms app (iOS and Android) needs to send an email (upon request from the user). Right now, when the user presses the appropriate button I'm calling
Page.Navigation.PushAsync(new SendEmailPage)
And then in the SendEmailPage constructor I'm using the DependencyService to send an email:
IMail mail = DependencyService.Get<IMail> ();
mail.SendMessage ("Contents");
I've implemented IMail in both Android and iOS, but looking just at the Android version:
void IMail.SendMessage (string contents)
{
Intent emailIntent = new Intent(Intent.ActionSend);
emailIntent.SetType ("message/rfc822");
emailIntent.PutExtra (Intent.ExtraEmail, new string [] { "me#notreal.com" });
emailIntent.PutExtra (Intent.ExtraSubject, "Subject");
emailIntent.PutExtra (Intent.ExtraText, contents);
Forms.Context.StartActivity (Intent.CreateChooser (emailIntent, "Send email"));
}
When I run this code, and click the appropriate button, it pops up an email "Compose" window with all the appropriate information filled in, and I can click the "send" button to send the mail. Cool!
Side Question: Am I correct in assuming there's no way to send an email "quietly" (without requiring additional user intervention)? This would not be something done maliciously, our app would only do this when the user asked to, and would certainly request the appropriate privileges if this is possible.
Main Question #1: When the "Compose" window comes up, if I click the back button in the title bar, it takes me back to my email Inbox, not back to my application. How do I invoke the email intent/activity in such a way that its back button brings the user back to my app?
Main Question #2: Instead, when the "Compose" window comes up, if I click the back button in the bottom of the screen, it does come back to my app, but tells me "Message saved as draft" which isn't what I want. I would rather have the message deleted, and then re-create it if the user hits the appropriate button again.
For Main Question #1, I believe that starting the activity with
Forms.Context.StartActivityForResult (Intent.CreateChooser (emailIntent, "Send email"));
instead of:
Forms.Context.StartActivity (Intent.CreateChooser (emailIntent, "Send email"));
should work to get you back to your Forms activity. At least in a non-forms app that should work, and I suspect it should in a Form app as well, but not 100% certain.
I can not answer your side question, though I suspect that this is intentional. I am sure you are not intending to do anything malicious and that the user requests the email, but if the OS allowed sending the email without user interaction, developers who are not as ethical as you might abuse the feature. But don't quote me, there may very well be a way to do it, I just don't know how if so.
As for Main Question #2, without changing the behavior of the email client app, I don't see how you could do as you wish as it is the mail client itself that is saving the email as a draft.

how to track sent message event in windows phone?

Is there a way in windows phone to track sent message event? i mean to say that whenever a message is sent then a function of my application execute
all i want is to execute a function whenever sent message button of windows phone is clicked?
If you open the message launcher (I don't remember the exact name), it'll open this screen and you have the event (something like application deactivated) and once the user sends the message, the screen should close and come back to your app (again another event is available at that point, activated).
So you'll have to play with the events to do something you like, IIRC there is no call back when the message button is clicked.
Here's a link with the lifecycle of apps
There is no API that notifies you if a message was sent (at least no open API). A similar question was asked here.

RSS-reader feed updates when app is suspended

So, Ive made Windows Phone app that contains rss-feeds. I would now like to add the possibility for toasts to popup when a stream is updated. Ive read up on how to use Toasts to notify the user, but how can i make my rss-reader periodically poll the rss-feeds for the latests news when the app is suspended in the background. Example code would be highly appriciated!
Check the "Background Agent Sample" Windows Phone Code Samples to see how you can create a periodic background agent, that will allow you to pool the rss feed(s) and show a toast notification to the user!

Resources