Waking the computer in Windows Store apps - c#

How can we wake the computer from standby, sleep and/or hibernate in a Windows 8 metro-style application?
I have tried using the code I had for my old Winforms and WPF apps and even read and tried many tutorials online but nothing works. Also when searching for this there appears to be no results pointing to any kind of documentation.

Windows RT does not expose such low level API if i am correct. Windows Store apps are for simple easy to use - mainly consumption apps.
You can however couple your windows store app with a ful windows app (desktop / traditional app) that your windows store app communicates with (WCF etc). The traditional app can do all it did before.
the only downside is that you cannot install your traditional app on Windows RT

Related

Can windows phone store apps run in tablet?

I am developing new windows phone 8.1
[RT] application working fine , but now my client want to give support to tablet also . Does my application work in tablet or I have to create a universal project ?
Please help me out for this .
Windows Phone 7.x or 8.x apps do not run on Windows 8/8.1/10 "out of the box" - you need to either have a universal app, or share your code (for example as a portable class library) to allow it to also run on the desktop variant of the OS.
If you want your app to run on over vendors tablets (such as Android or iOS) there are solutions that allow some code sharing, but again, you're looking at supporting another codebase to achieve this.

Can you call an external application from a Windows 10 Universal application? c#

I have been working on a Minecraft server wrapper for the past week. I was looking forward to making a windows 10 universal app, but in my learning and testing I discovered that System.Diagnostics.Process is not supported in windows 8 store apps. When trying to add the code to my Win 10 dev machine in a 10 project I am being told that it cant be resolved.
Is there going to be a way to launch an external process and capture the output into a textbox with Win10 Universal apps or am I out of luck?
Your target app will need to support app services to do this. It isn't possible to launch and control arbitrary apps. If the target app is designed as an app service then you can launch and communicate it with Launcher.LaunchUriForResultsAsync
For more on app services see the Build session App-to-App Communication: Building a Web of Apps

Invoking desktop app from Windows Store app

I have a Windows form desktop application developed using c#. I want to make use of the live tile feature available in WinRT apps (especially for Windows 10). The data in the live tile is to be fetched using WMI queries (Win32_LogicalDisk).
How do I accomplish this? I don't want to rewrite the entire app. Live tiles should update on the background and on clicking the tile, my desktop app exe needs to be invoked. Is it possible to fetch WMI data and invoke exe from Windows Store apps?
I tried using Brokered Windows Runtime components as given in http://blogs.msdn.com/b/dmx/archive/2014/04/30/how-to-trigger-a-desktop-process-from-windows-store-apps-the-easy-way-using-the-brand-new-visual-studio-templates.aspx . But could not get it to work as I get a 'TypeLoadException'.
Thanks in advance.
Metro app can't run a desktop app. However, they can commumicate using wcf. So, you can create tiny windows service that will open wcf host. Then you create windows store app with your live tile(s). When windows service recieves a wcf call, it starts the desktop application.
There is also devexpress' solution that is capable of adding live tiles for desktop apps, however it is not free: https://www.devexpress.com/Products/NET/Controls/WinForms/Live-Tile-Manager/
WinRT blocks network loopback so wcf won't work. You can disable this for testing but I suspect that won't satisfy you. Read more here (and search for WinRT network loopback to find articles on this topic).
https://msdn.microsoft.com/en-us/library/windows/apps/Hh780593.aspx

Is it possible to have a windows desktop app with metro interface (or a metro app with no intention of going to the windows store)?

Apologies for the noobish question, and I did try to search but couldn't find the right answer (or didn't search properly).
Currently have an app developed in a windows desktop environment because it gives us access to deeper features of the PC such as serial port comms etc. that the normal metro environment wouldn't allow. We're currently developing the UI based on metroUI so we can run it on an 8.1 touchscreen (metroUI looks good, gives us a touch-screen experience with PC features) but we have no intention of putting it on the marketplace.
Just wanted to confirm if this is in fact doable, and we can have this desktop application with a metro UI? Or is my noobishness meaning I'm overlooking some technical feasibility that makes it impossible?
This is doable with the Windows 8.1 Update (from April 2014). It's not supported before that since Windows Store apps were blocked from communicating with desktop processes.
The Windows 8.1 Update adds a feature "Brokered Windows Runtime Components" designed to allow side-loaded Windows Store apps to communicate with a desktop back-end. This will allow your Windows Store app UI to call the desktop component to access API that aren't available in the limited app package environment.
See Brokered Windows Runtime Components for side-loaded Windows Store apps for details.
See Try It Out: Sideload Windows Store Apps on TechNet for how to enable side-loading on your systems. See Windows 8.1 Update: Sideloading Enhancements for updates on how to enable a system for sideloading (no license required when on a domain, and significantly easier to get a sideloading license for non-domain joined systems).
The developer license system is designed for development and test purposes only. You really don't want to use it for production. Use the proper enterprise side-loading system instead.
From my understanding, the whole point here is to make it look like a Windows Store app. If you're app is a WPF one, you can already use Mahapps.metro.
You can create a Windows Store app without going to the store by Sideloading it. You create an app package first. The user has to right click the .ps1 file in that package to see the option Run with PowerShell and install it in a very old fashioned DOS like manor. It will only run when the user has a Microsoft Developer License and renew it every month. However, it is not allowed to keep using a Developer License of the end user to run a Store app. In the end, the system has to be domain bound to be allowed to run these apps, or you have to buy a Enterprise Sideloading key. These come in packages of 100 for $ 3000,- or you can unlock all PC's for 1 client for $ 100-.
It would be nicer if the specific pros of a Store program were available in a desktop environment but with W10 coming up I do expect a bit more integration and less restrictions.
Hope this answers your question.

A Data Caching framework for Windows Phone?

I've recently started developing apps for Windows Phone 8 (I have no prior native app development experience, I'm primarily a web app developer) and I have been looking for a good HTTP caching framework for Windows Phone.
I'm working with a REST based API which returns JSON data and want to incorporate response caching with different caching policies depending on the data.
I stumbled upon AgFx which pretty much fits what I've been looking for but that was primarily for Windows Phone 7. I haven't been able to find something similar for Windows Phone 8, which works with the Portable HTTPClient library (I'm looking to reuse my code between Windows Phone and Windows 8).
I was wondering if anyone from the Stack Overflow community ever came across something which provides a flexible data caching for WP8, or if someone was ever able to port AgFx to Windows Phone 8.
There is something similar available and it's from Q42
Take a look at the code here: https://github.com/Q42/Q42.WinRT
It's both for win rt and wp8
Also, there has been an effort to port AGFX to Win RT by Indrajit Chakrabarty ( twitter #indyfromoz ), but it wasn't as stable when I tested it...
Link for that here https://github.com/indyfromoz/AgFx

Categories