Do DPI-Groups of WinPhone8 and WinRT Displays exist? - windows-phone-8

Does Microsoft group WinPhone8 and WinRT device's displays into groups/categories as Apple (iOS: standard and retina) and Google (Android: ldpi, mdpi, hdpi, etc.) do?
WinPhone8 DPI range from about 220 up to 440, so I doubt that's all "standard".
I've searched but found nothing…
If someone could give me a link to the docs that would be great!
Why do I need this Info:
I'm adding WinPhone8 and WinRT support to my Unity3d Editor extension xARM.
It provides a sortable list of resolutions, display diagonals, … and DPI-Groups per platform. Currently the DPI-Group-Column is empty...

Windows Phone 8 and Windows RT devices aren't grouped into DPI categories.
However both platforms have their own scaling system which is based on resolution (not DPI). So it could be used for grouping, but it's not a very helpful info.
http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj206974(v=vs.105).aspx
http://msdn.microsoft.com/en-us/library/windows/apps/hh465362.aspx

Related

Override default behavior of navigator.bluetooth.requestDevice()

When I call navigator.bluetooth.requestDevice({acceptAllDevices: true}), a chrome window pops up with the devices around me. I can only pick 1 device here. Is there a way to pick multiple devices or not have this window pop-up; Can I implement my own web based window that show BLE devices around me?
navigator.bluetooth.requestDevice({acceptAllDevices: true})
.then(device => {
console.log(device);
});
The Web Bluetooth GATT Communication API does not allow you to bypass this prompt. See https://developers.google.com/web/updates/2015/07/interact-with-ble-devices-on-the-web#request_bluetooth_devices
The upcoming Web Bluetooth Scanning API however will let you scan for nearby advertisements and connect to devices: https://webbluetoothcg.github.io/web-bluetooth/scanning.html
It is not fully implemented yet in Chrome.
Follow https://github.com/WebBluetoothCG/web-bluetooth/blob/master/implementation-status.md to keep track of changes.
The new navigator.bluetooth.getDevices API (in Chrome 85 and later) actually allows you to avoid this prompt IF you've previously used requestDevice to pair a device.
The chromestatus page on it is here: https://www.chromestatus.com/feature/4797798639730688
And it contains a link to a developer guide.
The simplest hackiest use would be:
navigator.bluetooth.getDevices().then(function(devices) {
if (devices.length==0) put_up_button_for_requestDevice();
else return devices[0].gatt.connect();
}).then(finish_connecting_as_normal)

Appbar guidance results in "Invalid qualifier: SCALE-240"

The Windows universal app guidance for app bars suggests you include app bar icons are 100 scale (32x32), 140 scale (45x45) and 240 scale (77x77) icons.
The issue is that when I include a 240 scale I get the following warning when I compile: Invalid qualifier: SCALE-240
It seems to me that the scale is not supported. My question then is should I include it, remove it or change to a different scale (perhaps 180)?
Scale-240 is recommended for Windows Phone apps and works there (the default templates provide Scale-240 assets). Windows Store apps typically use scales-80,100,150, and 180. See How to name resources using qualifiers
The Scale-240 asset won't cause any problems at runtime, but will be ignored on Windows. You'll definitely want to include other scales instead or with it.

Soft vibration, in an app

Okay I'm developing a win phone app, and I have buttons here and there and I want the phone to vibrate when someone hits a button.
I managed to do that with
using Windows.Phone.devices.Notification;
VibrationDevice v = VibrationDevice.GetDefault();
v.Vibrate(TimeSpan.FromSeconds(0.1);
However that vibration is rather strong and annoying to get everytime someone hits a button, I'm wondering, do we get access to the soft vibration? Like when someone hits the windows button / back key / search glass - those three buttons have a more soft vibration
For WP7.1 you could use XNA:
Microsoft.Xna.Framework.WindowsPhone.Input.GamePad.SetVibration(player, leftMotorStrength, rightMotorStrength)
However, for Windows Phone 8 this is not possible.
Please refer to MSDN for more details.
You can use a shorter timespan. Do some experiments on different devices. You might need to use different values for different devices.
I got a really nice soft vibration from Samsung ATIV Odyssey with TimeSpan.FromSeconds(0.01). However, HTC 8X seems to ignore a timespan this short - the results with 0.02 was somewhat inconsistent; 0.03 was a good one.

Using ShellTileSchedule in WP8 with Wide Tiles

Is there any way to use ShellTileSchedule in Windows Phone 8 to update wide tiles?
Windows 8 has TileUpdateManager with StartPeriodicUpdate method which is perfect for what I want to do but I can't find equivalent in Windows Phone 8.
It is possible to use ShellTileSchedule to update the wide background see http://www.developer.nokia.com/Community/Wiki/Generating_Live_tiles_for_Windows_Phone_from_Live_Data
No, the ShellTileSchedule only supports one resolution remote image. Instead you should use a PeriodicTask background agent and update the tile yourself (using C#)

What fonts are built in flash player/AIR?

I'm porting my AIR app to iPad. I'm using embeded fonts in textfields in my app. But when user starts editing text (after double click the textfield.type is set TextFieldType.INPUT), the text is geting huge... Embeded font is DejaVuSans. When I do textfield.embedFonts=false the huge font problem disappears. I'm not even trying to ask why the font can get huge (looks like it's specific for my app). The question is a bit more simplier. When I set textfield.embedFonts to false Times font is used. But I need DejaVuSans. Heres the question: how is called in flash player (so that I can do textFormat.font=NAME) and where are all available fontfaces are listed?
Thank you in advance!
No fonts are built into Flash Player or AIR. Besides embedding fonts yourself, you can use the fonts that are installed on a user's computer (and some fonts are available on almost all OS'es like Verdana and Times).
You can get a list of all fonts on the user's machine via the enumerateFonts method of Font like this:
(copied from http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/text/Font.html#enumerateFonts%28%29)
var allFonts:Array = Font.enumerateFonts(true);
from the manual:
enumerateDeviceFonts:Boolean (default = false) — Indicates whether you want to limit the list to only the currently available embedded fonts. If this is set to true then a list of all fonts, both device fonts and embedded fonts, is returned. If this is set to false then only a list of embedded fonts is returned.