5. Raw Sensor Type Windows 8.1 Windows Phone 8.1
3D-Accelerometer Yes Yes
3D-Magnetometer Yes Yes
3D-Gyroscope Yes Yes
Ambient Light Yes Yes
Short Range Proximity No Yes
Simple Device
Orientation
Device
Orientation
Inclinometer Compass Shake
6. // Determine whether we have a gyro on the phone
_gyrometer = Gyrometer.GetDefault();
if (_gyrometer != null)
{
// Establish the report interval (units are milliseconds)
_gyrometer.ReportInterval = 100;
_gyrometer.ReadingChanged += _gyrometer_ReadingChanged;
}
else
{
MessageBox.Show("No gyrometer found");
}
7. // Establish the report interval (units are milliseconds)
uint reportInterval = 100;
if (_gyrometer.MinimumReportInterval > reportInterval)
{
reportInterval = _gyrometer.MinimumReportInterval;
}
_gyrometer.ReportInterval = reportInterval;
19. <!-- We'll use the Serial Port Profile service on any device. -->
<m2:DeviceCapability Name="bluetooth.rfcomm">
<m2:Device Id="any"> <!-- or ="vidpid:xxxx xxxx bluetooth" -->
<m2:Function Type="name:serialPort" />
<!-- use name:<service> as above, or… -->
<m2:Function
Type="serviceId:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"/>
</m2:Device>
</m2:DeviceCapability>
You cannot modify the Bluetooth device capability using the Manifest editor in Microsoft Visual Studio.
You must right-click the Package.appxmanifest file in Solution Explorer and select Open With..., and
then XML (Text) Editor.
24. <m2:DeviceCapability Name="bluetooth.genericAttributeProfile">
<m2:Device Id="model:xxxx;xxxx"|"any">
<m2:Function Type="name:heartRate"/>
<!-- use name:<service> as above, or… -->
<m2:Function Type="serviceId:xxxxxxxx"/>
</m2:Device>
</m2:DeviceCapability>
You cannot modify the Bluetooth GATT device capability using the Manifest editor in Microsoft Visual
Studio.
You must right-click the Package.appxmanifest file in Solution Explorer and select Open With..., and
then XML (Text) Editor.
36. Windows.Networking.Proximity.ProximityDevice proximityDevice =
Windows.Networking.Proximity.ProximityDevice.GetDefault();
if (proximityDevice != null)
{
// The format of the app launch string is: "<args>tWindowst<AppName>".
// The string is tab or null delimited. The <args> string can be an empty string ("").
string launchArgs = "user=default";
// The format of the AppName is: PackageFamilyName!PRAID.
string praid = "MyAppId"; // The Application Id value from your package.appxmanifest.
string appName = Windows.ApplicationModel.Package.Current.Id.FamilyName + "!" + praid;
string launchAppMessage = launchArgs + "tWindowst" + appName;
var dataWriter = new Windows.Storage.Streams.DataWriter();
dataWriter.UnicodeEncoding = Windows.Storage.Streams.UnicodeEncoding.Utf16LE;
dataWriter.WriteString(launchAppMessage);
var launchAppPubId =
proximityDevice.PublishBinaryMessage(
"LaunchApp:WriteTag", dataWriter.DetachBuffer());
}