Properties can be divided in two groups: matching properties and applying properties.
Matching properties are those used to test the browser and device properties (such as the browser user agent, the device pixel ratio, the display orientation width and height, etc.) in order to choose the best model for each case.
match-device-pixel-ratio
Matches any device with a specific pixel ratio.
match-mobile
Matches any mobile device.
match-orientation
Matches any device with the specified orientation: landscape or portrait.
match-screen-height-range
Matches any device with a screen height in the specified range. This range is expressed as From-To (for example, 900-1200).
match-screen-width-range
Matches any device with a screen width in the specified range. This range is expressed as From-To (for example, 400-600).
match-screen-height
Matches any device with a specified screen height.
match-screen-width
Matches any device with a specified screen width.
match-user-agent
Matches devices by comparing the device browser user agent to the string value supplied. This string is a regular expression.
Applying properties are those used to determine the final size and resolution.
Use the parent-model property to set the parent model:
parent-model
Establish the parent model for this model.
The following properties deal with the display resolution:
device-pixel-ratio
Overrides the original device pixel ratio, scaling the content accordingly.
max-device-pixel-ratio
This property determines the maximum device pixel ratio accepted. The lesser of the device’s device pixel ratio and this value is applied to scale the display.
The following properties deal with the screen size of the remote desktop, in pixels. You can determine it by setting the actual height and width, or by establishing maximum and minimum values for these properties.
height
Remote desktop height.
width
Remote desktop width.
max-height
Remote desktop maximum height.
max-width
Remote desktop maximum width.
min-height
Remote desktop minimum height.
min-width
Remote desktop minimum width.
The following properties allow you to specify device screen areas that will never be used for displaying the remote connection, such as when a browser or device bar cannot be hidden and uses up screen space. These margins will be excluded for screen size calculations.
margin-left
Width of an area at the left of the device screen that will not be used for displaying the remote desktop.
margin-bottom
Width of an area at the bottom of the device screen that will not be used for displaying the connection.
margin-right
Width of an area at the right of the device screen that will not be used for displaying the connection.
margin-top
Width of an area at the top of the device screen that will not be used for displaying the connection.
Miscellaneous properties:
use-full-screen
For mobile only. If the device’s browser supports the full-screen mode, this property indicates the remote desktop size should be calculated to occupy the whole screen. When not in full screen, the content will be scaled.
Read more:
· Examples
This example shows a possible ruleset and how it will affect different devices:
In this case, when connecting with an ipad, the following models will be matched:
[default]: This model applies to all devices.
[mobile]: The ipad will match the match-mobile property.
[ipad]: The ipad will match the user agent keyword ‘ipad’ specified in the match-user-agent property.
The resulting properties for this device will be:
Using the same ruleset, when connecting with an iphone4, the following models will be matched:
[default]: This model applies to all devices.
[mobile]: The iphone will match the match-mobile property.
[iphone4]: The ipad will match the user agent keyword ‘iphone’ specified in the match-user-agent property, together with the match-screen-width and match-screen-height properties. An iphone6, with a screen width of 667px, and a screen height of 375px, would match the ‘iphone’ user agent keyword, but not the size.
The resulting properties for this device will be:
Among the wide range of valid resolutions that Thinfinity VirtualUI offers, the most commonly used —for its flexibility and simplicity— is “Fit to Browser”. This configuration allows you to adjust the remote application to fit the available browser size. However, when it comes to accessing a desktop from different devices, the sometimes huge differences between screen sizes and pixel resolutions (i.e. iPhone 4 vs a 27 inch iMac Retina Display) make it impossible to have a simple rule to determine the best remote desktop size. Even when the application is adjusting properly to the available size, the screen rendered might still look tiny or disproportionate, making the user experience not as satisfactory as expected.
Tailoring "Fit to Browser"
Now, using a new configurable browser detection ruleset, we can tailor the way we want to see of the remote desktop/application on every device. This ruleset allows you to specify rules that will detect the web browser, device and display characteristics, and set parameters that adjust the remote desktop/application resolution according to your own taste.
The main characteristics that need to be taken into account are:
· The browser User Agent, that tells about the web browser and device
· The device pixel ratio, that tells about the real display resolution
· The device display size
· The display orientation (landscape or portrait)
The browser detection ruleset is stored in a file with entries that contain specifications (rules) that match general or specific devices. Each entry (model) can inherit matching parameters (properties) from a more general model. For example, you can define an iOS model and an iPhone4 can inherit the iOS model properties.
A default ruleset file named BrowserRules.ini is installed in the Thinfinity VirtualUI program folder. Then, if it doesn’t exist there yet, it is copied to "\programData\Cybele Software\Thinfinity\VirtualUI\" and renamed as Thinfinity.VirtualUI.BrowserRules.ini. You can safely customize this file as it won’t be overridden with a program update.
The structure of this file is as follow:
Note: for these settings to apply, the connection’s ‘Resolution’ property must be set to ‘Fit to browser’, and the BrowserRules.ini file must be pointed in the application profile.
Configure this setting in for your application in the 'General' tab of the Application Profile, or the 'General' tab of the Application Profile in the development server.
Read more:
· Examples
In order to choose a model from the ruleset, Thinfinity uses the client device type, dimensions, resolution, orientation and browser:
If match-mobile exists, it tests if device is a mobile.
If match-user-agent exists, it tests the browser’s User Agent.
If match-device-pixel-ratio exists, it tests the device’s pixel ratio.
If match-orientation exists, it tests the device’s orientation.
If match-screen-width-range or match-screen-height-range exist, it tests to see if the screen size is in range.
If match-screen-width or match-screen-height exist, it tests the exact screen size.
Once the model is selected, the parameters are applied in this way:
If the width and height properties exist, then it applies them.
If the browser width is less than the min-width, it applies min-width.
If the browser height is less than the min-height, it applies min-height.
If the browser width is greater than the max-width, it applies max-width.
If the browser height is greater than the max-height, it applies max-height.
If a specific device-pixel-ratio was specified, it applies it.
If a max-device-ratio was specified, it takes the minimum of the real device pixel ratio and max-device-ratio property and applies it.
Read more:
· Examples
A section defines a model, and each model contains a set of properties divided in two groups: matching properties and applying properties.
Models are organized in an inheritance tree. The relationship between models is defined by a special property rule called parent-model, present in all models except in the [default] model, which is the tree's root node and includes some basic properties.
Every other model must directly or indirectly inherit from the [default] model. Also, each model contains its own rules that match general or specific devices, and inherits all specifications (including matching parameters) from its ancestors.
When more than one criteria is met for a device, a scoring system is used to resolve this conflict.
This is the in-the-box models tree:
Read more:
· Examples