How do I setup a single application for cross platform deployment using MRTK? - mrtk

I am trying to build an application (converting rather), that builds into a server (UNET/ Mirror wise), a windows client, Oculus Go client and UWP client. More platforms will be implemented in the future.
Unless I did not tackle this the right way, the Toolkit does not seem to be capable of doing this with just one profile, or maybe not at all.
E.g.: I need the mouse for Windows and motion controllers for UWP. Having both in the MixedRealityInputSystemProfile spawns both on UWP. If I don't add the mouse I have nothing on Windows Standalone. This leads me to the conclusion that I have to create multiple profiles. But the MixedRealityToolkit only references a single one. Does that mean I have to additively load a different Toolkit with it's configuration for any platform configuration I want?
The DefaultMixedRealityInputSystemProfile already contains a lot of inputs, which makes me think it should be capable of doing that, but it looks like it does so to a certain degree and then fails.
Thinking further about this:
What if I want an UWP app, but for MR Portal only, or for UWP Standalone only. What about Oculus Go (Android) and Android mobile? The differentiation would be using the Oculus SDK under Android. Using it under windows would result in the Rift being used I guess.
Where do I branch off what?

I believe you can specify which input providers you want on different platforms. For example, if you want a MouseProvider in Windows only, the you can specify the Mouse Input Data Provider to run only on Windows via the “supported platforms” field of the mouse data provider.
Similarly you can enable the motion controllers using same technique.
While there are not yet ways to specify completely different configurations for different platforms, it is possible to solve your specific case of input by configuring the input data providers.

Related

Hololens Device Portal Kiosk Mode web api

I am building a tool in which I am using windows device portal wrapper in order to connect and access hololen's device portal.
I would like to be able to get/set kiosk mode from my tool so I dont need to go to device portal and do it manually.
Windows device portal wrapper doesnt give any functionality to access kiosk mode though.
Does anyone know the web api path for this?
Thanks in advance
So since it looks like you're building a tool for converting HoloLens into Kiosks, you need to do this at scale. If you are looking to create a different method of converting your HoloLens into Kiosks, I think you should go provisiong packages.
Provisioning packages will let you make a package you can keep applying to multiple HoloLens. Also some companies don't like enabling developer mode, and this is a method that doesn't have a security risk. Also device portal only allows a single app Kiosk, where as you could create a Multi app Kiosk if you wanted using other methods.
https://learn.microsoft.com/en-us/hololens/hololens-kiosk#set-up-kiosk-mode-using-a-provisioning-package-windows-10-version-1803
Do this help things? I know it's not actually what you were looking for, but hopefully it helps. It it doesn't let me know, I might have a different potential solution.
Kiosk Mode can be set via Device Portal’s REST API by doing a POST to /api/holographic/kioskmode/settings with one required query string parameter (“kioskModeEnabled” with a value of “true” or “false”) and one optional parameter (“startupApp” with a value of a package name). Please keep in mind that Device Portal is intended for developers only and should not be enabled on non-developer devices. The REST API is subject to change in future updates/releases.

Xamarin.Forms or Xamarin.Android/Xamarin.IOS

I am new to Xamarin and not sure if chose Xamarin.Forms to create a application for ios and android platform has a problem or not.
The application has some features below:
The application will be able to running some code in background without launching application by user.
The application can be launched by a href link or a notification.
The application is able to launch a builtin Camera application, and receive picture data from Camera application.
Thanks,
Bo
The features you are mentioning can be done with both. Actually, anything you can do on Xamarin.iOS and Xamarin.Android can be done with Forms. Because Forms is only an abstraction layer for the UI which is installed by a NuGet package.
Now, having that said when to use Forms or when to use iOS/Android? It is mostly about UI. Are you going to do some advanced or platform specific stuff is is easier to implement that with the platform specific project.
If you UI will be the same in both platforms and mostly consists of some lists and input fields, then that is a very good candidate for a Forms project.
Notice how I said it is easier to do in the platform specific projects. Again here, you can do anything in Forms as well by the means of Custom Renderers, it is just a bit harder to do.
Ideally try it out yourself and see what suits you best.
In regard with your need to execute code in the background. This will be tricky and is very dependent on the platform that you're on. You will definitely have to write platform specific code for that for which you can use the DependencyService to abstract it to your shared code.
However like AlancLui mentioned executing code in the background isn't something that is easy to do on mobile. On iOS it is restricted to accessing location data or playing music, but still your app needs to be running (in the background). Android has something called Services for this, which makes it a bit easier.

Windows 10 universal app cross app communication availability

I am an WPF developer with little knowledge for the way "mobile" apps work but in general I believe that they work in some sort of sandbox way (meaning they should not be able to access each others process, info etc., I might be totally incorrect on this one). So I am wondering if such "limitations" are applied to the Universal Windows Platform (UWP) apps?
The reasoning for my question is that I would like to write and app that checks if another Universal App is in process and use some of its information. In WPF there are ways of doing just that but in UWP apps I am not sure if it is/should/will be possible.
Thanks.
There are a couple of solutions in Windows 10. Firstly, if you are building an enterprise app and can also side-load normal Desktop apps, you can use this technique to build your UI as a UWP but also be able to break out of the sandbox and do other things on the desktop.
Secondly, if the app you want to read from is cooperative (ie, is designed to provide information; you're not just grabbing it without permission) then you can use App to App services to send and receive information between two consenting applications.
Both links are to //build videos but you can download the slides too that should contain code samples.

Qt 4.8.4 QWS Server Programmatically Set Focus With Multiple Client Apps

I understand ( How does windowing work in qt embedded? ) that you should run one Application as the QWS Server to provide window management facilities, but that you can run other Apps with graphical interfaces as well in Qt Embedded for Linux.
I want to programmatically switch focus between windows without requiring mouse / keyboard interaction to achieve focus. I've searched the following docs but am not seeing any way to make a different window 'active':
http://qt-project.org/doc/qt-4.8/qwsserver.html
http://qt-project.org/doc/qt-4.8/qapplication.html
http://qt-project.org/doc/qt-4.8/qsessionmanager.html#details
http://qt-project.org/doc/qt-4.8/qwswindow.html
QWSServer has a method:
const QList<QWSWindow *> & QWSServer::clientWindows ()
Which returns a list of QWSWindows, but I don't see how I can make one of those windows the currently active window. How can I do this? Thanks -
The accepted answer is false in some sense. I think solution is to find needed window by clientWindows, then call QWSWindow::setActiveWindow() and then QWSWindow::raise().
QWSWindow provides the undocumented raise() method. See: qwindowsystem_qws.h definition of QWSWindow. You need this type of functionality if you want to make any sort of window manager.
Undocumented can beat impossible in some situations.
It is even more complex and difficult, if you wish to let non-Qt applications have focus, etc.
If you are trying to do it using QWSServer::clientWindows (), then forget about it. QWSWindow and QWSClient are just providing interfaces to get information about client windows. You can not control them from the server application.
There are two ways to do what you want :
do it from the application creating the window
embed the client windows using QWSEmbedWidget, and then you get some kind of control

Windows 8 metro style apps and window hooks

I am new to both window hooks and Windows 8 metro apps..
I would like to develop a background service/process that:
Checks the "properties" of the metro app that a user just tapped to start (e.g. app that plays music, text document creator app, ...)
Based on the properties found, activate other applications (i.e., before starting the text creator application that the user just tapped, make him select the font face from a popup list)
I am planning on using window hooks to do 1 and 2..
Is this possible?
Thanks!
It is not possible to hook Windows or intercept the launching of a Metro style app from within a Metro style app itself. While it may be possible to do so with a service installed on the machine in a classic way, doing so would be totally undocumented and unsupported. You would have to reverse-engineer the app launching process to have any chance at making it work.
Check this out..
http://social.msdn.microsoft.com/Forums/en/wcf/thread/43df6c8f-f1e3-4aba-af0a-7c4e1db477b6
You can only write client applications using Metro, not server applications.
In your scenario, if you want inter-app communication, recommended way is to use 'Contracts' which are explicitly started by the user.
I'm taking a blind guess here using your 1 and 2 points. Do you intend to handle a specific file type ? say .txt or .wmv ?
If this is your intention, please check here http://tozon.info/blog/post/2011/10/11/Windows-8-Metro-declarations-File-Type-Associations.aspx
There's also a good set of MSDN documentation about this.
You may use API hooking. Check this thread:
http://forum.nektra.com/forum/viewtopic.php?f=9&t=6228

Resources