Background Task to record closing time of the Toast Notification and Write it in a file - windows-store-apps

Toast notification have a "close button" in the upper right corner.I want to get the current time and the title of the Toast notification when user click that "close button" and write that time and title in the xml format in the file.

I want to get the current time and the title of the Toast notification when user click that "close button"
Takarii's suggestion was on the right direction. The ToastNotification has Dissmissed event, it occurs when a toast notification leaves the screen, either by expiring or being explicitly dismissed by the user. You can add a timestamp to record the time.
write that time and title in the xml format in the file.
You could refer to the official XML DOM sample for details.

Related

How to start the Einstein Bot on specific keyword?

I created an Einstein Bot on Production for WhatsApp Chat, I want it to only start only on specific keywords/messages, for example, ="test"
So that the bot doesn't reply to customers, as it is not completely ready. Please help, if you can.
I didn't find any solution, because according to me, there isn't any variable which can store the first "hi/hello" message from the customer
I resolved it.
In Welcome Dialog Box, I created a dialog Box and typed a generic message. After that, I saved the response in a variable and in Rules I checked whether the variable value is equal to the specific keyword or not.
If yes, call the dialog to another dialog box. Check the attached image for reference.

In Ews push notification mode, I am getting unwanted unsaved Appointment. How to get rid of them?

I am using Exchange Web Services' push notification mode. I noticed that when I "New an appointment" in Exchange, if I click "attachment" button, it jumps to Attachement page, and push a "Item" notification into the SOAP servlet right away, without me "Save" the appointment. I guess this is probably how it works. But then I need to identify this "Item" as unfinished in my code, such that I can ignore it until I received another notification when the appointment is actually saved. So far, I've tried a number of properties such as isDraft, isDirty, getAppointmentState and etc to identify this "unsaved" appointment, but none of them worked.
So my questions are:
Can I config the exchange server such that it stops pushing notification for "unsaved" appointment?
Failing to do (1), how can I identify the "unsaved" appointment? Which property to check?
Thanks in advance,
Ling
Notifications are basically just telling you that an Item has been created on the server and based on way the UI action is taking place the client is creating an item to cater for the UI interaction so you will get a notification regardless. There is no such concept as a draft appointment and then next notification you get for that appointment should be an update. Multiple notification for an appointment is something that your code you should expect and deal with if you synchronization process is going to work reliably.
One thing you can try is to look at the item that is being created with a MAPI editor like OutlookSpy or MFCMapi as that will tell you if there is a specific extended property that you maybe able to use.

Quiz with countdown enabled upon opening

How can I implement an online application which sends emails to selected users. The email contains a link which is available for 3 days after the email was sent. If the user clicks the link before it expires, then they will open a new browser window/tab with the user specific questions and a countdown timer that begins on window load. Starting from that moment, with no pause permitted, they have exactly 1 hour to answer the questions.
The quiz will be submitted by user or automatically with all the answers after the timer reaches 60 minutes.
The user can see the time remaining (updating real time somewhere in the UI).
If possible I would like to implement it in a way that if user accidentally closes the tab, he can open it again with all the answers saved.
We are currently working with Java/Spring Boot(REST API - backend), ReactJS(frontend) + MySQL database.
We do not know exactly how we should search the keywords needed for that email-link-expiration logic. The login method, creation of the quiz and the sending of it to a user along with the database structure is clear for us.
We appreciate any help or implementation ideas (or even technologies)
The ideea was to generate each quizz with a specific random token, like this:
04e69b43-f6e2-4a6b-835b-dd58c95e41810
Then, send the email to the specific person myapp.com/quizz?token=token.
A CRON job in backend will check the creation date of the quizz and check if 3 days have passed without being assessed for the first time and mark the quizz as expired if so(of course, when the link will be assessed and the quizz is expired, an error message will be displayed).
If the quizz is not expired and user clicks, automatically start the quiz and save in the database firstClickTime and expirationTime = firstClick + 1h.The frontend will send each minute a JSON with everything he has written so far to prevent any lost answers if he closes the tab.
Of course there are also some other small details, but this is the whole idea.

How to trigger a "flyout, dialog, app bar or other inline element" if the phone receives a notification while the app is closed?

I'm working on a Windows Phone app that will receive push notifications and needs to show critical alerts to the user. As far as I can see there are 3 types of push notification:
Raw Notification - Raw notifications are used when your application is actually running on the device. This allows you to
update your interface “live” as the user is using it.
Toast Notification – This message will be received regardless of whether your application is running or not, but popping toast messages
while your app is running might be a little annoying. I’ll
demonstrate this example below. Toast WILL NOT also update your
application’s data. You still need to pass a Raw Notification to make
this happen.
Tile Notification – If your application is pinned to the user’s Start screen, you can update the Tile for your application. You can
change the background image, as well as an integer from 0-99.
source: http://www.jeffblankenburg.com/2010/10/19/31-days-of-windows-phone-day-19-push-notifications/
These each have different behaviours, but none lend themselves to critical notifications, where the user can be actively alerted to critical information.
Having read Guidelines for toast notifications on MSDN, it suggests
Don't use toast notifications to notify the user of something that
must be seen, such as a critical alert. To ensure that the user has
seen your message, notify them in the context of your app with a
Flyout, dialog, app bar, or other inline element.
So the question is, how can I trigger a "flyout, dialog, app bar or other inline element" if my app is closed and the phone receives a critical notification.
long story short: you can't enforce that your app opens on an incoming pns
But I think you've got the toast scenario wrong. A toast can be used to notify the user, if he taps it the app opens and you might react to that by the navigation uri (e.g.: ?fromToast=true).
If you receive a toast notification while your app is open the toast won't show. Toast Notifications only get displayed when your app isn't open. But you can react to an incoming toast notification (there's an event for that) to implement an behavior of your way (e.g.: flyout, msgbox, ...).
note: introduced with GDR3: The sound of the toast notification can now be changed (even made silent).

Toast notification disappears after 10 sec in windows phone 8

Toast notification disappears after 10 sec,if user does not tap on that and I am not able to get How to handle this, if user misses the notification.
Requirement is that toast should not disappear untill user taps on it.
One way of doing this is to send toast and tile notification at the same time.so that if user misses the toast notification then he may find it on tile.But not able to get how to do it using push sharp.So please suggest any solution for the following :
How to decide duration of toast notification using push sharp?
If 1st one is not possible then how to send toast and tile notification together using push sharp?
Thanks
A toast notification displays for about 10 seconds unless the user dismisses it with a flick to the right. If the user taps the toast, by default, your app's start screen launches. Or, you can choose to specify which screen of your app will launch.
There is no way to override the duration of the toast notification.