Using raspberry Pi o run a single application - c#

I Am currently working on a project, and my idea is to build an application in C#, that runs on the Raspberry pi 2 with windows 10 IoT. My requirements are that the application starts automatically when the device is powered on, and is the only application that a user can interact with. (I cannot remember the technical term, but its similar to how an ATM runs on XP, but the user never sees XP, only the application to carry out transactions. I would like to use the Pi in this way.)
Is this possible?? If so, how would I go about achieving my goal?
Any help is Appreciated

If you're building a windows universal application, it should satisfy your needs by setting your app as the default app.
Go to Web-based device management portal, select Apps tab, choose your app in the installed apps list and click Set Default.

There are two options for running apps with win10: headed and headless. Headless runs in the background and is suitable for computations or tasks that require no user interaction. In your case, where you want the user to do something, you want a headed app.
take a look at Microsoft's IOT site and there are lots of samples describing how to get started: https://dev.windows.com/en-us/iot

Related

Open application from Universal Windows(UWP)

So for our project, we have this app that's in the Windows Store. It is a Unity UWP app. At some point, we want to check if program X is installed on the user's machine. If yes, we want to launch it, if no we want to provide the user with a download link (or whatever.)
The app we want to launch, however, is a Unity standalone app. The user can download it from our website.
I tried multiple things. PlayerPrefs, Register checking etc. None of these really work. Register checking turned out to work decently well, but that only works between standalone apps. UWP apps seem to have no access to the Register.
Which left me thinking about URIs etc. But, I'm a complete noob regarding all of this and I have no clue how or where to start. Any help or direction is highly appreciated.
Ideal scenario:
User downloads our app from the Windows Store
Users click a button within our app
Our app checks the user's system for App X
If App X is installed, we launch it, if not we do something else
App X opens.
The UWP app cannot interact with the standalone Unity app directly.
You can write another standalone desktop “helper” app that does the actual work of checking the registry and launching the Unity app, and then make this “helper” app part of the UWP package and resubmit the package to the Windows Store.
Keep the “helper” app as simple as possible so it doesn’t have other dependencies.
Use FullTrustProcessLauncher to launch the helper app when the user clicks the button.
And the UWP app needs to have runFullTrust capability in order to use FullTrustProcessLauncher.
runFullTrust is a restricted capacity and when you submit the app to the Windows Store it is required for you to specify the reason why the capacity is necessary for your app. See this answer for more details.

How to execute Process commands (or similar) using a Universal Windows Platform (UWP) App?

I'm working on creating custom Cortana commands. The commands are registered and executed using a Universal Windows Platform Application. (GitHub)
For instance, I've registered the following command
<Command Name="ShutDown">
<ListenFor>Shut down</ListenFor>
<Navigate/>
</Command>
To run this function in a UWP application
static async void ShutDown()
{
var dialog = new MessageDialog("This is where I would shut the computer down.");
await dialog.ShowAsync();
//System.Diagnostics.Process.Start("Shutdown", "-s -t 10");
}
But after setting this up I learned System.Diagnostics.Process isn't supported in UWP.
The custom commands I want to run involve some sort of execution such as launching external programs, running other scripts, or opening websites.
It makes sense that UWP doesn't support them given that it's universal and an XBox or a phone might not be able to do these, but I was hoping there was some alternative or hacky way to accomplish this on a Windows 10 PC.
Is there a way for me to execute Process commands or something else with similar functionality in a UWP application? It seems like even though I can get Cortana to execute my C# code, UWP doesn't support much that would be useful in this situation.
Thanks in advance.
There are - limited - ways to achieve similar behavior.
You could use LaunchUri to trigger other apps which registered for a certain URI-Scheme. This should work for your webbrowser scenario. More details here:
https://msdn.microsoft.com/en-us/library/windows/apps/windows.system.launcher.launchuriasync.aspx
You could trigger another app and get results back from it using LaunchForResults. The called app has to support this. More details here:
https://msdn.microsoft.com/en-us/library/windows/apps/mt269386.aspx
You could trigger App Services provided by another app. The called app has to support this. The app service will be executed in background. ( I think this is pretty cool.) More details here:http://blogs.msdn.com/b/mvpawardprogram/archive/2015/06/11/writing-windows-10-app-services-in-javascript.aspx
This is a little hacky: I'm not sure if this still works but it did work for Windows 8.1: You could create a so called "Brokered Component". This allows you to trigger everything from you app on you machine, but you won't be able to publish a brokered component into the store. This also allowed Process.Start() on Windows 8.1. It only worked for sideloaded apps. I'm not sure if it still works on Windows 10.
More info here: https://msdn.microsoft.com/en-us/library/windows/apps/dn630195.aspx
Summary:
Starting another app is pretty easy as long as the target app registered as app service or registered a protocol handler (Uri scheme).
Starting scripts or other *.exe is impossible if option 4 doesn't work any longer.
With the Windows 10 Anniversary Update (1607) there is an option to enable this scenario on PC. With this API in the Desktop Extension SDK you can launch a fulltrust process that runs at the full user privileges:
https://learn.microsoft.com/en-us/uwp/api/Windows.ApplicationModel.FullTrustProcessLauncher
This way you can light it up on the platforms where it is supported, i.e. PCs running 1607 or above. And your app will still be universal:
if (ApiInformation.IsApiContractPresent("Windows.ApplicationModel.FullTrustAppContract", 1, 0))
{
await FullTrustProcessLauncher.LaunchFullTrustProcessForCurrentAppAsync();
}

Detect when your windows 8 app is uninstalled?

How can I tell using c# or winjs when your app that the user downloaded is being uninstalled?
Can you call home, or try to save the client by giving/redirecting them to a site with an exit poll?
Not supported. A key goal with the Windows Store is to make it seamless and painless for consumers to try apps. One result of this is that Store apps don't have any control over or hooks into install/uninstall processes. Bottom line is that the act of uninstall is not a time to try to exercise user engagement strategies. :)

How to Port or Convert existing Windows Store App(Metro Style) to Desktop App?

I have an existing App in Windows store(Metro Style)[XAML,C#]. I would like to convert this to Desktop(Ultra-book enabled ) and upload in to the Intel AppUp Store.
The application uses GPS and call several web API for certain features.
I there any tool to covert? or how could i port this app to Ultra-book enabled desktop app.?
Please provide step by step help or link..
I would check with Intel what APIs they provide for AppUp. I am almost sure though that there are no tools for this and you just need to solve it on a case by case basis.
I don't think there is any tool to convert it for you. Based on my experience with Intel AppUp, if you can extract your metro app functionality and create a normal desktop application for it, you should be able to submit the app in the AppUp store.
You will have to create a msi package for your desktop app and the msi should create a desktop shortcut which can launch your app. The appUp guys somehow figure out the shortcut target and can launch the app from the AppUp client itself. You will also have to take care of uninstallation from the appup interface.

Which Continuous integration programs support a good workflow for Windows Phone 7

I'm a bit confused on how continuous integration works with a Windows Phone App. Is there a way to upload the app to the marketplace automatically, or do you still need to do a manual update?
Do I need my own server for this, or are there hosted options?
And which program works best to test, build, and continuously integrate a windows phone 7 app?
Edit: I'm using Atlassian Jira, but Bamboo seemed to only apply to Web apps, not apps that are deployed on devices. I have no requirements, and no experience, and don't understand how CI even works with a non-Web based project. However, I do want our code to be passing all it's tests before it's committed to SVN, and if there is a way to automatically push the latest stable build to our users, in an automated way, that would be great.
Marketplace submission is a manual process and there is currently no way to do this automatically.
There are various continuous integration processes and tools available. Whether you need a separate server to run it on or which program will be "best" for you will depend on your scenario, requirements, experience and preferences.
You can use any solution which supports Visual Studio 2010 as long as you can install the Windows Phone SDK on the same machine. Hosted solutions may or may not allow you to do this.

Categories

Resources