Retrieve device information in Windows Phone - c#

How i can retrieve information about installed devices in windows phone (e.g. gps, bluetooth, accelerometer)?
In windows mobile I can use Status or SystemState class. And what about Windows Phone?
I'm beginner with this technology, and I have to do this for university.

There is a Device Status sample on MSDN which can guide you through using the Devicesstatus class which can be used to query for the presence of a keyboards and other optional hardware components -- it is my understanding that a location sensor (GPS or otherwise), bluetooth and possibly the accelerometer are all part of the minimum hardware specification so these are not reported via this API (as there is nothing to query)

Related

Connect android phone to UWP application offline

I am building a C# UWP Windows 8.1 application. I will like to know if there is a way I can connect my phone to my UWP Desktop app offline. I intended to transfer certain data and eliminate the time it takes for the devices to communicate with the server (- especially in cases of bad/no network here in Nigeria).
You can connect the two devices either using Bluetooth or Wi-fi direct. Bluetooth will probably be easier to setup. The process will be different for both platforms:
Bluetooth - UWP, Android
Wi-Fi Direct - UWP, Android
Bluetooth has broader support, but Wi-Fi direct may prove faster if you want "near real-time" performance.

iBeacon support for Windows Phone devices

iBeacon in Windows Phone devices -: We need to develop a windows phone application with iBeacon support similar to iOS applications. We didn't find any useful informations on this. Can anyone suggest a better solution on "How to implement iBeacon on Windows Phone Devices?"
Unfortunately, I have confirmed with Microsoft engineers that this is not possible as of Windows Phone 8.1.
While this operating system version did introduce Bluetooth LE support, the APIs do not allow scanning for iBeacons because scanning functions are locked down to the operating system. Thitrd party apps are not allowed to perform scans which would be needed to look for beacons. The OS itself has no functionality to scan for iBeacons, only the ability to scan for connectable Bluetooth LE devices and pair with them.
Third party apps can look for devices implementing known GATT profiles like so:
var themometerServices = await Windows.Devices.Enumeration .DeviceInformation.FindAllAsync(GattDeviceService .GetDeviceSelectorFromUuid( GattServiceUuids.HealthThermometer), null);
But iBeacons do not advertise GATT services, so this won't help. What is needed is either native support for locating beacons or third party access to raw scan results, which is needed to decode beacon identifiers.
Microsoft is expected to expand support for Bluetooth LE in their upcoming Windows 10 release, which will have a unified desktop/mobile codebase. It is possible the necessary functionality will be included. This OS will not be released until late 2015 and no preview APIs will be available until early 2015, which is the soonest we may have confirmation that such support is coming. Because the company is putting so much energy into this release, it is unlikely there will be any new functionality added to Windows Phone 8.x in the meantime.

USB CDC on Windows 8 RT

Can a Windows Store Application communicate with a USB-connected device through a virtual COM Port?
Does the framework for such apps contain the SerialPort class?
If not, in what other way can I create a connection between a device and an App?
All this assuming that Classic Desktop is unavailable.
You aren't the first to ask. But let me be the first to answer: http://blog.jerrynixon.com/2012/05/metro-answers-can-i-use-serial-port.html
The short answer is no. With this exception: the device is on USB (with a dongle) with a modern driver exposing IOCTLS device information – this gives Windows Store Apps device access.

Can I use the Bluetooth serial port in Windows Phone 7.1 and up?

I want to develop an app for the Windows Phone app store that communicates with my car's OBD2 port via Bluetooth.
Long story short, the app will use the bluetooth serial port to send a hex value and retrieve the corresponding value in the ECU's register. There's an android app called Torque which does this.
I can't figure out how to use the serial port though. The only bluetooth functionality mentioned is high-level stuff like pushing objects, pairing, etc. But nothing about setting baud rates or writing to a specific COM port.
Is this possible on WP7/*? Or alternatively, how can I make this possible and get my app approved for distribution?
UPDATE: I haven't been able to get my hands on a WP8 device yet, so I can't verify whether or not this is possible using SSP.
As a bonus note in case you came here looking for alternatives: you can also NOT connect to ad-hoc wifi connections, so the wife-based OBD2 adapters are no good either. There is an ugly way of connecting to the latter which involves having a laptop in your car which is simultaneously connected in ad-hoc mode the the device and is also acting as a wifi hotspot. It is utterly impractical.
Using the Bluetooth Serial Port (SSP) is not possible with public APIs of Windows Phone 7.x. As you've kind of guessed already, the app will likely not be approved for the marketplace if private APIs are P/invoked or otherwise used.
Consider upgrading to Windows Phone 8 as the Bluetooth SSP is partially available there, see Nokias Developer site for example.

Get Window Phone Signal C#

I've already asked this but for iOS and they told me it was impossible.
I migrated to android and Windows Phone.
For Android I've found but not tested this
http://www.firstdroid.com/2010/05/12/get-provider-gsm-signal-strength/
AFAIK it works. My problem is I'm now testing windows phone but I'm unable to find anything related to this problem. Some people mention WMI and I'm unable to figure out what this is.
Thanks
P.s I,m programming for Windows Phone 8 and 7.1
The closest thing we have is Microsoft.Phone.Net.NetworkInformation and it's parent namespace Microsoft.Phone.Net . These API's don't provide the raw data for the signal but they are able to tell you if the phone is on mobile broadband, the network operator, roaming info, etc. It's designed so that you app can be away of data usage, and intelligently respond when using 3G vs Wifi.
There is a GetSignalBars method in ConnectionProfile, available in Windows Phone 8
http://msdn.microsoft.com/library/windows/apps/windows.networking.connectivity.connectionprofile.getsignalbars.aspx

Categories