How to implement App-To-App Communication between WP8 and Win8 devices - windows-8

I want to implement app-to-app communication across a WP8 device and a Windows 8 device. I can't rely on Internet connectivity so any web server is out of the question. Additionally I don't want to use any local server to avoid setup overhead.
The most likely scenario is to use Bluetooth connectivity to pair and send small data sets between devices. I know that App-To-App communication between two WP8 devices, or two Win8 devices can be easily achieved using PeerFinder. However, I need to do cross-device.
MSDN documentation suggests that using PeerFinder.AlternateIdentities will allow this to happen, but it seems to require a tap gesture using NFC-capable devices. In my case, I want to be able to establish the communication without having to rely on the NFC Tap gesture.
The problem is that even setting and using AlternateIdentities doesn't seem to enable the devices to see each other. Digging deeper into the code, seems that Win8 devices require WiFi Direct to advertise and establish connectivity, which is not supported by WP8 devices.
Has anyone been able to solve this issue, or implement this scenario?
According to other threads, the only clear answer (although it doesn't work) is:
app-to-app / WP8-to-Win8. Using specific AlternativeIdentities on both ends it's also possible to get app-to-app to work for WP8-to-Win8. You'll need to set PeerFinder.AlternateIdentities["WindowsPhone"] on Win8 to the WP8 app GUID, and you'll need to add PeerFinder.AlternateIdentities.Add("Windows",GUID) on WP8 to the Win8 app GUID.
Thanks in advance.

Since FindAllpeersAsync function of PeerFinder uses WiFi Direct to do the peer discovery in Windows 8, and Bluetooth is used in the Windows Phone version, they are note compatible.
So, as for now, the following statement,
app-to-app / WP8-to-Win8. Using specific AlternativeIdentities on both ends it's also possible to get app-to-app to work for WP8-to-Win8. You'll need to set PeerFinder.AlternateIdentities["WindowsPhone"] on Win8 to the WP8 app GUID, and you'll need to add PeerFinder.AlternateIdentities.Add("Windows",GUID) on WP8 to the Win8 app GUID.
is basicallly false.

Related

is it possible to use an normal usb for web authentication (webauthn / fido2)

i want to know if it is possible to make a security key out of a normal usb.
i am using webauthn api for php at the moment on a windows 10 device, if you take a quick look at the demo of webauthn and try to register with an usb it wont recognize it as an security key. is there any way to fix this?
i tried using windows aplications like usbRaptor but those will only lock my pc.
Not sure what "a normal USB" actually means, but you need a purpose-built FIDO security key for FIDO2/WebAuthn.
There are many vendors including SoloKeys, HID, Yubikey, TrustKey, and many others. https://fidoalliance.org/certification/fido-certified-products/

Porting web application to Chrome OS (with multi-monitor support)

I'm in the process of porting an application to ChromeOS with the requirement that it should look and feel as native as possible. This means in particular that it should allow things such as multi-monitor support and USB support.
One possibility would be to implement it as a web application (since we have already a web client), but in this case I would need to add support for native features (again, multi-monitor support and USB device access), so I wonder what needs to be done in this case. My wild guess as a ChromeOS developer newbie is that I would need to extend the code with ChromeOS JavaScript features, and I don't know if this is possible.
Another possible approach would be to write an Android application, since I see that ChromeOS added support for Android applications (in this case I would have to write the code from scratch).
Finally, another option would be to write native code, which could be possible for example relying on a Crouton development environment, and reuse the code of a native C application.
What approach would you recommend to build a ChromeOS application starting from a web application or from a native one?
What approach would guarantee access to native features (multi-monitor support and USB)?
I discovered two APIs which should help with multi-monitor support:
https://developer.chrome.com/extensions/windows
https://developer.chrome.com/apps/system_display
The system.display API allows one to discover and monitor the current monitor layout, while the windows API allows one to create several windows in the same application. By combining these ones I should be able to create a window for each monitor in case I go with the chrome implementation route.
Given that I already have a native implementation for Linux, Crostini (as opposed to Crouton) is also very appealing since it provides a deeper level of integration with virtually no changes to the code and no need to maintain two different versions of the web client, with the only downside that it requires the user to create a Linux environment and manually install the application, also it is not supported on all chromebook devices and on many it will be never supported.
I still need to check what is the performance overhead. Also the level of integration with USB I/O might be higher than the one achievable by using the chrome API.

How to get my Windows 10 Universal App to recognize my Microsoft Band

I'm trying to make a Windows 10 Universal App to make a third party tile for my Microsoft Band but it doesn't say in the documentation how to get my App to recognize the Band through USB. It only says how to do it through Bluetooth. The documentation also doesn't tell me how to access the GPS sensor. How do I do all these things?
To answer your first question, USB for the Band is used for charging. In order for you to test, you need to go through via Bluetooth. Your setup should be
Visual Studio > Launch App on your Device (mobile is connected to your laption via USB) > Test App on Mobile (which talks to Band via Bluetooth).
Note: Make sure Band is paired with the Mobile you are using to test.
To answer your second question, you can not subscribe to GPS on the band. It is not opened for thrid party app access. GPS is exclusive at this point.

WiFi Direct on Windows Phone 8.1

Is it possible to use WiFi Direct to connect to another device (Raspberry Pi) without tapping (NFC)?
The app needs to be able to find all WiFi Direct devices (Raspberry Pi's) in its vicinity, and by tapping one a connection is made to send strings.
The app needs to be able to detect new devices, that have never been paired with the phone before.
Windows Phone doesn't support WiFi direct communication from the SDK. Although it is available in Windows 8, its not yet present in phones.
According to Channel 9, MSDN
Windows 8 natively supports Wi-Fi Direct and has integrated the technology into the Windows 8 Play To and proximity sharing experiences.
However this doesn't apply for windows phone.
There are apps on the store which supports it, but I have no idea how to implement that in programming. Take a look at the process of using those apps
http://www.lumiamine.com/2014/07/wifi-direct-on-windows-phone.html

Get type of device inserted to windows 8 pc via USB port

I've been asked to work on a project for Windows 8 where I have to detect:
Type of device inserted to USB port (mass storage drive or android phone or windows phone etc.)
Port in which device was inserted. (if I have 4 USB ports in PC then identify which port received new device)
Detect when the device was ejected from the PC
Are there some managed C# API's that can be used to query or if there are some callbacks that can be subscribes to.
Any help or direction will be very useful.
Thanks
You don't specify whether you are writing a desktop app, or a Modern UI app. If it is the latter, I'm afraid you are going to be out of luck as this level of information is simply not passed down to the app's sandbox.
You may have better luck with a desktop app. I don't have any direct experience of doing what you ask for, but I do remember having read that it may be possible through .NET.