Is it possible to create un-skippable full screen alerts in windows? - c#

I want to create a notification or an alert for the user to restart the PC if it hasn't been done so for 5 days.I used windows toast to do this but found out that toasts can be dismissed and there is no way to perform an action upon dismissal, this is not good as the user can just dismiss the toast without restart the pc for n number of days. I need to implement something similar to the "Low/Ciritical battery" or the "Low Disk Space" Notification (see pictures attached).
I have tried some searching on how to implement this alert but almost all the sources use toast notifications to display the alert. Any help would be appreciated. Thanks.

Related

Is there a way to make Notifications appear on the lock screen after being seen as a banner? iOS12

In our app we are doing journey logging. The process where a user can press start, drive to their destination, press stop and their journey is recorded. With a notification reminding them that they are currently logging a journey.
I have the notifications working on android as follows: When the user taps start there is immediately a local notification icon at the top of the screen. When the phone is locked this notification also appears on the lock screen.
I have it kind of working on iOS where the notification will appear as a banner immediately after the user taps start. The notification will also appear in the notification center but not the lock screen.
https://learn.microsoft.com/en-us/xamarin/ios/platform/user-notifications/advanced-user-notifications?tabs=windows
Reading through the Microsoft documentation it seems that the notification is displayed depending on the state of the phone/app? Is there a way to instantly show the notification as a banner when the user taps start and also show the notification when the user locks their phone? All of this is assuming the user has the relevant settings turned on in iOS 12.
Unfortunately ,as far as I know , this can not be realized by third party Map.The notification in lock screen is a static notification display.
Alternatively, you can display alert to tell user updated info when in lock screen.
Otherwise , if using Apple's Map to navigation, when lock screen , you also can see full map view .
Here is the Apple document about UserNotifications .

How do I show status to users from my UWP app?

We are creating an application(must be UWP for Microsoft app store). The application will remain running and we want to “hide” the UI from the desktop after they log in (not in taskbar). We want to put it somewhere where they can see the status of the application and/or logout (like a VPN or Anti-virus app shows status).
We have investigated using systray (non existent in uwp), quick actions tray (seems to be for system applications), notifications (show status there, but user can remove it—looking for something like the Action Center buttons for Wifi). Our goal is to have an application running, but out of the way, with access to the status and logout functionality. What is the Microsoft approved way? If there is no such approved way, how have you solved this?
At this point, that's not supported in UWP.
You can however publish WPF applications to the Microsoft Store using Desktop Bridge. I haven't touch it, but I've seen a few apps in the store running more elevated access than UWP and you may have the ability to control the visibility of the application's icon (ie taskbar/systemtray).
Give it a try and let us know if it works.
You're right, but there are some workarounds that can be used:
1. USING THE DISMISSED EVENT to show the notification again if user dismissed it.
2. UWP APP WITH SYSTRAY EXTENSION
As explained in this blogpost, you can add a component that will create the tray icon.

Mono Android - Display dialog even when application is not in focused

I was wondering if there is a way to display an alert dialog even when your application is minimized/not focused.
I'm creating a small alert system app for a small company. I'm using Xamarin. Don't really have to worry about old API Levels, every phone is 15+.
You can't show an alert but you can start an activity that is styled as a dialog (transparent background + your content in the middle). To do this start the activity as a new task. Example:
startActivity(new Intent(context, YourActivity.class).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
This proved to work on all devices as long as it's not in standby with a secure lock - password for example.

How to execute a WINFORM when card is swiped on a card swipe machine

I am trying to build a window service which will run in background for card reader, I will take card's data on a textbox . My question is :
When someone swipes a card on a card reader that window service WINFORM should take card;s data on a textbox. How can I achieve this.
or,
IF any one can tell me just that how to execute a WINFORM when card swipes, that would work also
Thanks
Windows services aren't supposed to show any kind of UI to the user, they run as completely background task that take no input from the user and show no output or status to them. If you require a service to "talk" with the user, the normal practice is to split the project in 2 different programs, one being the service itself, which is a UI-less thing that does the background processing, and a normal user app, maybe ran at login, that shows notifications and communicates with the service. Consider also that services survive logoff and logon, and there may be many users logged at a given time, so it doesn't make sense to show a dialog to anyone.
My suggestion would be to turn the service into a normal program, that the installer configures to run at startup, and it does the monitoring of the card reader and displaying of the popups asking details for the user. Since there will be no background work, other than monitoring, and if the form is absolute required, it doesn't makes sense to monitor without a user logged in, I don't think a service is the best choice.
I have seen two type of card readers:
1 - plugs into your keyboard port and acts as a keyboard (can also plug into a USB port, but still simulates a keyboard). When a card is swiped the info is written to whatever application and text field currently has focus.
2 - Has some kind of hardware driver (most likely a USB driver, possibly Serial or other).
If you aren't sure which you have then open notepad, make sure it has focus, and swipe the card. If the details show in notepad then you have #1. If they don't, then you probably have #2
If your reader is #1 then you can put some code into the Textbox's TextChanged event to do what you need (I presume you can add code to the application as you said you are building it).
If your reader is #2 then it really depends on the driver it uses. Some will likely provide an API you can integrate with, but you will need to find documentation.
Do you have a model number and manufacturer for your card reader?

Is it possible to programmatically lock a windows phone 7 device?

I'm creating a WP7 app that needs to continue running when the user is not using the phone - ideally the user sets it going, locks the phone and carries on with their life.
Is this possible?
I know it is possible to disable the lock screen, so if the user were to just leave the phone on a table it would be fine and carry on running. The problem is when they put it in their pocket - buttons will get pressed such at the windows/home button, and if this happens then the app is tombstoned straight away.
Any ideas if this is possible? Either somehow locking the phone without tombstoning the app, or implementing a sort of custom lock screen and handling the events for all the hardware buttons including the windows/home button?
Any suggestions will be appreciated.
Just as you figured out:
PhoneApplicationService.Current.ApplicationIdleMode = IdleDetectionMode.Disabled
No need to ask user for permission anymore (since the original 6.3.1 "Configurable Functionality" was dropped). However, there are other Marketplace certification requirements to consider, see section 6.3: http://go.microsoft.com/fwlink/?LinkID=183220
I think I've done it again - asking questions too soon.
I believe the following setting:
PhoneApplicationService.Current.ApplicationIdleMode = IdleDetectionMode.Disabled
will enable the application to run under a lock screen.

Categories