Is there a way to programmatically add an alarm entry from the app I am creating?
No, currently the SDK doesn't offer any capabilities to interact with systems applications like the Alarms app from a third-party application. I am sure there is a native hook for this (considering the way apps interact internally), but it's not publicly available right now.
Related
I'm currently researching on how to mute the windows 10 notification but it i havent found any concrete solution yet.
What i want to do is to disable all notifications when i press a button or check a checkbox.
It is similar on what you do on the notification settings, but i want it to do it progmatically on my application.
I'm currently reading the document of microsoft about Notification Listener.
https://learn.microsoft.com/en-us/windows/uwp/design/shell/tiles-and-notifications/notification-listener
NotificationListener allows you to access the notifications, but not to the configuration of the system. And you must think it's a UWP Api...
You want to do something that can not be done in UWP Api(impossible) nor WPF(possible, i wish you good luck).
You can't change system settings inside the UWP app box -safety and things-. The way to do it is "Open the Configuration App where you want the user make the change".
If you wan't to this in WPF/.net you'd have to play with PInvoke and WinApi seriously. And that means thinking about privileges, run as admin, find the functions in WinApi .h files, etc...
Keeping simple, in UWP, nope; in WPF, you have to read a lot of source code/documentation of Windows .h files, make the c# version of the structs, etc...
The real question here is... It's necessary? Windows provides Focus Assist with two clicks (corner, Focus Assist)
I really appreciate your feedbacks! I did some tinkering and found out the service responsible for the notification. I'm not really confident that this is the best approach, but it is working for me.
What I did was I stopped the service using C#. Here is my sample code:
ServiceController[] services = ServiceController.GetServices();
foreach (ServiceController service in services)
{
if (service.ServiceName.Contains(serviceName))
{
service.Start();
}
}
Here is the service responsible for the notifications:
Notification Service
I dont know if this is a good practice or not so I'm still open for feedbacks and suggestions.
Thank you!
It seems to be a deliberate security of Windows 10 Store apps that assemblies not be allowed to be loaded at runtime. I think that this feature is massive overkill and stops UWP development dead in its tracks. However, if it is a rock solid design decision by Microsoft, there is nothing we can do to argue with it.
Instead, I'd like to ask the question, assuming that you were not deploying your UWP app to the store, would it still be impossible to load an assembly dynamically? If it's possible, how?
Please see this feature request: https://wpdev.uservoice.com/forums/110705-universal-windows-platform/suggestions/18145291-dynamically-load-assembly
Regardless of what environment you deploy your UWP application to, the UWP API will be the same. Choosing to deploy your app internally instead of to the Windows Store will not enable non-supported API features, eg. Assembly.Load().
It seems as though the answer to this question is no.
The game has changed in UWP. UWP is a platform which is geared toward getting apps in to the store. It's a stripped down platform and doesn't appear to allow you to load assemblies at runtime. This was possible in .NET.
However, there does seem to be a way to run UWP style apps on top of the .NET runtime using the Desktop Bridge. I'm not really that familiar with it, but you can read more here as a starting my point. My guess is that if you want to load assemblies dynamically, the best approach would be to use this:
https://learn.microsoft.com/en-us/windows/uwp/porting/desktop-to-uwp-root
I'm developing a Windows 10 Universal app (UWP).
Is it possible to set application as TopMost (always on top)? Like WPF or Winforms (TopMost property).
Thanks
A feature called CompactOverlay mode was added in the Creators Update that supports this type of functionality. When an app window enters compact overlay mode it’ll be shown above other windows so it won’t get blocked. This allows users to continue to keep an eye on your app's content even when they are working with something else. The canonical example of an app taking advantage of this feature is a media player or a video chat app.
A blog post describing the feature can be found here
https://blogs.msdn.microsoft.com/universal-windows-app-model/2017/02/11/compactoverlay-mode-aka-picture-in-picture/
Short answer is no, there is no way as of today to make the application modal.
There is a petition going around asking for this functionality, which was requested last December but given the amount of votes it got (35 at the time this answer was written), it doesn't look like it will be taken into consideration anytime soon.
As mentioned in the comments, this functionality would be PC only so even if it was added, my assumption would be that it wouldn't work outside of the PC mode (so no tablet, mobile or surface family device support).
It's not possible UWP apps have some restrictions compared with WPF of Win32 apps(classic apps).
With uwp apps you need enable some capabilities to do something special in your app as you can see in the link uwp apps need ask for permission or they can't access or modify files directly.
https://msdn.microsoft.com/en-us/library/windows/apps/mt270968.aspx
Best Regards
Is it possible to implement service that starts on startup and monitors users acitivity only using Metro WinRT and API? I need somehow figure out a way to get information that user started watching video. I know that it is possible to implement it in normal .NET (by kernel functions), but I would like to know whether this is possible on WinRT tablets. Maybe by creating some triggers.
Thanks
No, fortunately as Raymond said - it is not possible. You can monitor only applications that you create yourself with code that comes with them. Or you could create a library that does monitoring you want and ask developers of applications to use it - basically what vendors of analytics libraries would do.
I hope you can help!
In brief, what I need is something like a cross platform web browser, with little or no chrome, that is easily distributable and allows the (local and remote) HTML pages running in it to receive messages (JavaScript?) when system global hotkeys are pressed.
I'm developing a desktop application which will utilise an existing web-based REST API. I would like this app to be cross-platform (Windows, Mac OS and Linux) and have a consistent interface across all platforms. The app runs in the system tray and uses global hotkeys for convenient access to a lot of it's functions without having to open the main UI window.
I have already written a rough initial version of the app using C#/Windows Forms, but there are a few issues. It currently uses unmanaged Win32 code to provide support for global hotkeys, which is not cross-platform even if I ported it to Mono. Plus, it's really not very pretty...
Ideally, I'd like to build the UI using traditional web technologies like XHTML/CSS and use JavaScript/AJAX to communicate with the remote API, which is why I thought Adobe AIR would be a good solution—but unfortunately it still doesn't support global hotkeys. I've also looked at XULRunner but I'm not sure I properly understand what that's intended for.
So the basic requirements for whichever combination of tools I will use are:
Allow me to create the user interface in XHTML/CSS/JavaScript
JavaScript to remotely communicate with the web API via AJAX
Allow the app to show—and be accessible via—a tray icon (in whatever OS it's running on)
Allow the app to respond to global hotkeys (again, in whatever OS it's running on)
Does anyone have any advice for me on this? I'm open to any suggestions and examples, no matter the language or tool.
Edit: I just stumbled across Nokia's Qt Toolkit, does anyone have any experience with this?
I think AIR application is a good solution. For the global hotkeys there are some "alternatives" Can I assign a global hotkey to an Adobe AIR app?