getscreensize
Mobile icon

GetScreenSize

Stable version 1.0.1 (Compatible with OutSystems 11)
Uploaded
 on 11 June 2025
 by 
4.0
 (4 ratings)
getscreensize

GetScreenSize

Documentation
1.0.1

The asset contains GetDimentions action and returns the result in a format Like:-


Android Platform Quirks


Return values:

  • width <Number> − screen width in pixels
  • height <Number> − screen height in pixels
  • xdpi <Number> − physical pixels per inch of the screen in the X dimension
  • ydpi <Number> − physical pixels per inch of the screen in the Y dimension
  • diameter <Number> − screen diameter in inches (rounded to two decimals)
  • densityValue <Number> − density point (0.75, 1.0, 1.5, 2.0, 3.0, 4.0)
  • densityBucket <String> − density bucket (ldpi, mdpi, hdpi, xhdpi, xxhdpi, xxxhdpi)


iOS Platform Quirks


iOS has no public API for getting the device's PPI.

The plugin returns the rendered pixels of the screen.

Return values:

  • width <Number> − rendered pixel width
  • height <Number> − rendered pixel height
  • scale <Number> − render scale (1× or 2× or 3×)


OSX Platform Quirks


Return values:

  • width <Number> − screen width in pixel
  • height <Number> − screen height in pixel
  • physicalWidth <Number> − width of the display in millimeters
  • physicalHeight <Number> − height of the display in millimeters
  • dpi <Number> − physical pixels per inch of the display



Browser Platform Quirks


The plugin returns the dimensions of the viewport. You can't get the real physical dimensions or the actual DPI of the browser ( see ).

Return values:

  • width <Number> − viewport width in pixels
  • height <Number> − viewport height in pixels


Figure 1. Representations of width-based window size classes.
Figure 2. Representations of height-based window size classes.



1.0.0

The asset contains GetDimentions action and returns the result in a format Like:-



Android Platform Quirks


Return values:

  • width <Number> − screen width in pixels
  • height <Number> − screen height in pixels
  • xdpi <Number> − physical pixels per inch of the screen in the X dimension
  • ydpi <Number> − physical pixels per inch of the screen in the Y dimension
  • diameter <Number> − screen diameter in inches (rounded to two decimals)
  • densityValue <Number> − density point (0.75, 1.0, 1.5, 2.0, 3.0, 4.0)
  • densityBucket <String> − density bucket (ldpi, mdpi, hdpi, xhdpi, xxhdpi, xxxhdpi)


iOS Platform Quirks


iOS has no public API for getting the device's PPI.

The plugin returns the rendered pixels of the screen.

Return values:

  • width <Number> − rendered pixel width
  • height <Number> − rendered pixel height
  • scale <Number> − render scale (1× or 2× or 3×)


OSX Platform Quirks


Return values:

  • width <Number> − screen width in pixel
  • height <Number> − screen height in pixel
  • physicalWidth <Number> − width of the display in millimeters
  • physicalHeight <Number> − height of the display in millimeters
  • dpi <Number> − physical pixels per inch of the display



Browser Platform Quirks


The plugin returns the dimensions of the viewport. You can't get the real physical dimensions or the actual DPI of the browser ( see ).

Return values:

  • width <Number> − viewport width in pixels
  • height <Number> − viewport height in pixels


Figure 1. Representations of width-based window size classes.
Figure 2. Representations of height-based window size classes.