Create Custom Devices

Filter by IDE
Select the AppBuilder client you are currently using for development.

IDE

The simulator provides a wide selection of default generic and custom devices that target iOS, Аndroid and Windows Phone. In the classic Windows desktop client, the extension for Visual Studio and command-line interface, you can also run your app on your own custom devices that you have manually defined in the configuration files of AppBuilder. You can create custom iOS, Аndroid, Windows Phone 8, and Windows Phone 8.1 devices.

In the in-browser client, you can run your app on the default custom devices and you can modify their user agents. You cannot create your own custom devices.

To add or modify a custom device, you need to edit CustomDeviceDefinitions.json.

On Windows systems, AppBuilder stores CustomDeviceDefinitions.json in %localappdata%\Telerik\BlackDragon.
On macOS systems, AppBuilder stores CustomDeviceDefinitions.json in ~/.local/share/Telerik/BlackDragon.

Procedure

In-Browser

In the in-browser client, you can run your app on the default custom devices and you can modify their user agents. You cannot create your own custom devices.

  1. In the top menu bar, select RunCustom Device.
  2. In the device simulator, in the UA text box, provide the user agent that you want to use.

Windows

  1. Close the device simulator, if running.
  2. In a text or code editor, open %localappdata%\Telerik\BlackDragon\CustomDeviceDefinitions.json.
  3. Review the format of the default custom devices.
    The default custom devices are LG Nexus 5 and Samsung Nexus 10.
  4. Insert a comma after the last closing curly bracket (}).
  5. On a new line, add the following code block.

    {
        "Name": " ",
        "Model": " ",
        "Uuid": " ",
        "DeviceSize": {
            "ScreenWidth": ,
            "ScreenHeight": ,
            "ScreenRealWidth": ,
            "ScreenRealHeight": 
        },
        "Label": " ",
        "ToolTip": " ",
        "Identifier": " ",
        "DevicePlatform": " ",
        "UserAgents": [
            {
                "MinVersion": " ",
                "UserAgent": " "
            },
            {
                "MaxVersion": " ",
                "UserAgent": " "
            }
        ],
        "DefaultOsVersion": " ",
        "SupportedOsVersions" : [
            " ",
            " "
        ]
    }
    
  6. Complete the name/value pairs in the device template.
    Make sure to preserve the quotation marks, where provided in the template.

    Name Description Sample Value
    Name This is the user-defined name of the device. My Android Phone
    Model This is the device model.
    The simulator returns the value of Model for device.model (Apache Cordova Device).
    XT1053
    Uuid This is the Universally Unique Identifier of the device.
    Set it as a random alphanumeric string.
    The simulator returns the value of Model for device.uuid (Apache Cordova Device).
    e0908060g740012323456732678432de8e601055
    DeviceSize → ScreenWidth This is the width of the device pane displayed in the simulator in pixels.
    Do not set a size that exceeds the width of the display resolution of your system.
    432
    DeviceSize → ScreenHeight This is the width of the device height displayed in the simulator in pixels.
    Do not set a size that exceeds the height of the display resolution of your system.
    768
    DeviceSize → ScreenRealWidth This is the actual width of the device screen in pixels.
    Set the device screen width as listed by the manufacturer, if any.
    1080
    DeviceSize → ScreenRealHeight This is the actual width of the device screen in pixels.
    Set the device screen width as listed by the manufacturer, if any.
    1920
    Label This is the name that the simulator shows in the list of available devices.
    Set a user-friendly name that you will be able to recognize quickly.
    Moto X (Android)
    ToolTip This is the tooltip that the simulator shows in the list of available devices when you hover over the custom device. Run your app on Moto X.
    Identifier This is a unique device identifier that the simulator uses to recognize and load the custom device.
    Set a unique alphanumeric value, no spaces, for Identifier. Otherwise, the simulator cannot load the device.
    The following values are reserved.
    • IPhoneSimulator
    • IPhone5Simulator
    • IPhone6Simulator
    • IPhone6PlusSimulator
    • IPadSimulator
    • AndroidSimulator
    • AndroidTabletSimulator
    • WindowsPhoneSimulator
    • Nexus4Simulator
    • Nexus72013Simulator
    • OneXSimulator
    • Lumia820Simulator
    • Lumia1020Simulator
    • GalaxyS4Simulator
    • GalaxyTabSSimulator
    • XperiaZSimulator
    MyMotoX
    DevicePlatform This is the operating system of the custom device.
    Set any of the following values.
    • Android
    • iOS
    • WP8
    Android
    UserAgents → MinVersion (Optional) From this version above (including), the simulator returns the specified user agent for the device. 4.4
    UserAgents → MaxVersion (Optional) From this version below (including), the simulator returns the specified user agent for the device. 4.3
    UserAgents → UserAgent This is the user agent that the simulator returns for the device.
    Do not hardcode the version of the mobile platform. Otherwise, the simulator returns the hardcoded version instead of the version selected in the Version drop-down menu.
    Set the version of the mobile platform with one of the following placeholders. The simulator automatically replaces the placeholder with the correct version value from your selection in the Versions drop-down menu.
    • Android versions: <version>
    • iOS versions: <version_escaped>
    • Windows Phone versions: <version>
    Mozilla/5.0 (Linux; U; Android <version> ; ko-kr; LG-L160L Build/IML74K) AppleWebkit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30
    DefaultOSVersion This is the version of the operating system with which the simulator loads the custom device.
    Set an existing version of the platform you set in DevicePlatform.
    4.4
    SupportedOsVersions These are the available operating systems versions between which you can switch from the Version drop-down menu.
    Set existing versions of the platform set in DevicePlatform. Make sure to set the value that you set in DefaultOSVersion. Separate versions with a comma and place each version on a new line.
    4.3
  7. Save changes to CustomDeviceDefinitions.json.

The next time you run the simulator, it will let you choose your device from the device drop-down menu → Custom.

Example

This is the markup of a sample CustomDeviceDefinitions.json. The markup contains the definitions for the default custom devices and a custom Windows Phone device.

[
  {
    "Name": "LG Nexus 5",
    "Model": "D820",
    "Uuid": "e0908060g740011221af33530138bde8e6010555",
    "DeviceSize": {
      "ScreenWidth": 432,
      "ScreenHeight": 768,
      "ScreenRealWidth": 1080,
      "ScreenRealHeight": 1920
    },
    "Label": "ILG Nexus 5",
    "ToolTip": "Run the application in LG Nexus 5 simulator",
    "Identifier": "Nexus5Simulator",
    "DevicePlatform": "Android",
    "UserAgents": [
      {
        "MinVersion": "4.4",
        "UserAgent": "Mozilla/5.0 (Linux; Android <version>; GT-P1000 Build/HRI83) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Safari/537.36"
      },
      {
        "MaxVersion": "4.3",
        "UserAgent": "Mozilla/5.0 (Linux; U; Android <version>; en-us; GT-P1000 Build/HRI83) AppleWebkit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13"
      }
    ],
    "DefaultOsVersion": "4.4",
    "SupportedOsVersions" : [
      "4.4",
      "4.3"
    ]
  },
  {
    "Name": "Samsung Google Nexus 10",
    "Model": "GT-P8110",
    "Uuid": "e0908060g740012323456732678432de8e601055",
    "DeviceSize": {
      "ScreenWidth": 640,
      "ScreenHeight": 1024,
      "ScreenRealWidth": 1600,
      "ScreenRealHeight": 2560
    },
    "Label": "Samsung Nexus 10",
    "ToolTip": "Run the application in Samsung Google Nexus 10 simulator",
    "Identifier": "Nexus10Simulator",
    "DevicePlatform": "Android",
    "UserAgents": [
      {
        "MinVersion": "4.4",
        "UserAgent": "Mozilla/5.0 (Linux; Android <version>; GT-P1000 Build/HRI83) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Safari/537.36"
      },
      {
        "MaxVersion": "4.3",
        "UserAgent": "Mozilla/5.0 (Linux; U; Android <version>; en-us; GT-P1000 Build/HRI83) AppleWebkit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13"
      }
    ],
    "DefaultOsVersion": "4.4",
    "SupportedOsVersions" : [
      "4.4",
      "4.3",
      "4.2"
    ]
  },
  {
    "Name": "Windows Phone 8x by HTC",
    "Model": "PM23100",
    "Uuid": "e0908060g740012323456732678432de8e601055",
    "DeviceSize": {
      "ScreenWidth": 360,
      "ScreenHeight": 640,
      "ScreenRealWidth": 720,
      "ScreenRealHeight": 1280
    },
    "Label": "HTC Windows Phone 8X",
    "ToolTip": "Run the application in the HTC Windows Phone 8X simulator",
    "Identifier": "HTCWP8X",
    "DevicePlatform": "WP8",
    "UserAgents": [
      {
        "UserAgent": "Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone <version>; Trident/6.0; IEMobile/10.0; ARM; Touch; HTC; Windows Phone 8X by HTC)"
      }
    ],
    "DefaultOsVersion": "8.0",
    "SupportedOsVersions" : [
      "8.0"
    ]
  }
]

Visual Studio

  1. Close the device simulator, if running.
  2. In a text or code editor, open %localappdata%\Telerik\BlackDragon\CustomDeviceDefinitions.json.
  3. Review the format of the default custom devices.
    The default custom devices are LG Nexus 5 and Samsung Nexus 10.
  4. Insert a comma after the last closing curly bracket (}).
  5. On a new line, add the following code block.

    {
        "Name": " ",
        "Model": " ",
        "Uuid": " ",
        "DeviceSize": {
            "ScreenWidth": ,
            "ScreenHeight": ,
            "ScreenRealWidth": ,
            "ScreenRealHeight": 
        },
        "Label": " ",
        "ToolTip": " ",
        "Identifier": " ",
        "DevicePlatform": " ",
        "UserAgents": [
            {
                "MinVersion": " ",
                "UserAgent": " "
            },
            {
                "MaxVersion": " ",
                "UserAgent": " "
            }
        ],
        "DefaultOsVersion": " ",
        "SupportedOsVersions" : [
            " ",
            " "
        ]
    }
    
  6. Complete the name/value pairs in device template.
    Make sure to preserve the quotation marks, where provided in the template.

    Name Description Sample Value
    Name This is the user-defined name of the device. My Android Phone
    Model This is the device model.
    The simulator returns the value of Model for device.model (Apache Cordova Device).
    XT1053
    Uuid This is the Universally Unique Identifier of the device.
    Set it as a random alphanumeric string.
    The simulator returns the value of Model for device.uuid (Apache Cordova Device).
    e0908060g740012323456732678432de8e601055
    DeviceSize → ScreenWidth This is the width of the device pane displayed in the simulator in pixels.
    Do not set a size that exceeds the width of the display resolution of your system.
    432
    DeviceSize → ScreenHeight This is the width of the device height displayed in the simulator in pixels.
    Do not set a size that exceeds the height of the display resolution of your system.
    768
    DeviceSize → ScreenRealWidth This is the actual width of the device screen in pixels.
    Set the device screen width as listed by the manufacturer, if any.
    1080
    DeviceSize → ScreenRealHeight This is the actual width of the device screen in pixels.
    Set the device screen width as listed by the manufacturer, if any.
    1920
    Label This is the name that the simulator shows in the list of available devices.
    Set a user-friendly name that you will be able to recognize quickly.
    Moto X (Android)
    ToolTip This is the tooltip that the simulator shows in the list of available devices when you hover over the custom device. Run your app on Moto X.
    Identifier This is a unique device identifier that the simulator uses to recognize and load the custom device.
    Set a unique alphanumeric value, no spaces, for Identifier. Otherwise, the simulator cannot load the device.
    The following values are reserved.
    • IPhoneSimulator
    • IPhone5Simulator
    • IPhone6Simulator
    • IPhone6PlusSimulator
    • IPadSimulator
    • AndroidSimulator
    • AndroidTabletSimulator
    • WindowsPhoneSimulator
    • Nexus4Simulator
    • Nexus72013Simulator
    • OneXSimulator
    • Lumia820Simulator
    • Lumia1020Simulator
    • GalaxyS4Simulator
    • GalaxyTabSSimulator
    • XperiaZSimulator
    MyMotoX
    DevicePlatform This is the operating system of the custom device.
    Set any of the following values.
    • Android
    • iOS
    • WP8
    Android
    UserAgents → MinVersion (Optional) From this version above (including), the simulator returns the specified user agent for the device. 4.4
    UserAgents → MaxVersion (Optional) From this version below (including), the simulator returns the specified user agent for the device. 4.3
    UserAgents → UserAgent This is the user agent that the simulator returns for the device.
    Do not hardcode the version of the mobile platform. Otherwise, the simulator returns the hardcoded version instead of the version selected in the Version drop-down menu.
    Set the version of the mobile platform with one of the following placeholders. The simulator automatically replaces the placeholder with the correct version value from your selection in the Versions drop-down menu.
    • Android versions: <version>
    • iOS versions: <version_escaped>
    • Windows Phone versions: <version>
    Mozilla/5.0 (Linux; U; Android <version> ; ko-kr; LG-L160L Build/IML74K) AppleWebkit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30
    DefaultOSVersion This is the version of the operating system with which the simulator loads the custom device.
    Set an existing version of the platform you set in DevicePlatform.
    4.4
    SupportedOsVersions These are the available operating systems versions between which you can switch from the Version drop-down menu.
    Set existing versions of the platform set in DevicePlatform. Make sure to set the value that you set in DefaultOSVersion. Separate versions with a comma and place each version on a new line.
    4.3
  7. Save changes to CustomDeviceDefinitions.json.

The next time you run the simulator, it will let you choose your device from the device drop-down menu → Custom.

Example

This is the markup of a sample CustomDeviceDefinitions.json. The markup contains the definitions for the default custom devices and a custom Windows Phone device.

[
  {
    "Name": "LG Nexus 5",
    "Model": "D820",
    "Uuid": "e0908060g740011221af33530138bde8e6010555",
    "DeviceSize": {
      "ScreenWidth": 432,
      "ScreenHeight": 768,
      "ScreenRealWidth": 1080,
      "ScreenRealHeight": 1920
    },
    "Label": "ILG Nexus 5",
    "ToolTip": "Run the application in LG Nexus 5 simulator",
    "Identifier": "Nexus5Simulator",
    "DevicePlatform": "Android",
    "UserAgents": [
      {
        "MinVersion": "4.4",
        "UserAgent": "Mozilla/5.0 (Linux; Android <version>; GT-P1000 Build/HRI83) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Safari/537.36"
      },
      {
        "MaxVersion": "4.3",
        "UserAgent": "Mozilla/5.0 (Linux; U; Android <version>; en-us; GT-P1000 Build/HRI83) AppleWebkit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13"
      }
    ],
    "DefaultOsVersion": "4.4",
    "SupportedOsVersions" : [
      "4.4",
      "4.3"
    ]
  },
  {
    "Name": "Samsung Google Nexus 10",
    "Model": "GT-P8110",
    "Uuid": "e0908060g740012323456732678432de8e601055",
    "DeviceSize": {
      "ScreenWidth": 640,
      "ScreenHeight": 1024,
      "ScreenRealWidth": 1600,
      "ScreenRealHeight": 2560
    },
    "Label": "Samsung Nexus 10",
    "ToolTip": "Run the application in Samsung Google Nexus 10 simulator",
    "Identifier": "Nexus10Simulator",
    "DevicePlatform": "Android",
    "UserAgents": [
      {
        "MinVersion": "4.4",
        "UserAgent": "Mozilla/5.0 (Linux; Android <version>; GT-P1000 Build/HRI83) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Safari/537.36"
      },
      {
        "MaxVersion": "4.3",
        "UserAgent": "Mozilla/5.0 (Linux; U; Android <version>; en-us; GT-P1000 Build/HRI83) AppleWebkit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13"
      }
    ],
    "DefaultOsVersion": "4.4",
    "SupportedOsVersions" : [
      "4.4",
      "4.3",
      "4.2"
    ]
  },
  {
    "Name": "Windows Phone 8x by HTC",
    "Model": "PM23100",
    "Uuid": "e0908060g740012323456732678432de8e601055",
    "DeviceSize": {
      "ScreenWidth": 360,
      "ScreenHeight": 640,
      "ScreenRealWidth": 720,
      "ScreenRealHeight": 1280
    },
    "Label": "HTC Windows Phone 8X",
    "ToolTip": "Run the application in the HTC Windows Phone 8X simulator",
    "Identifier": "HTCWP8X",
    "DevicePlatform": "WP8",
    "UserAgents": [
      {
        "UserAgent": "Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone <version>; Trident/6.0; IEMobile/10.0; ARM; Touch; HTC; Windows Phone 8X by HTC)"
      }
    ],
    "DefaultOsVersion": "8.0",
    "SupportedOsVersions" : [
      "8.0"
    ]
  }
]

CLI

If you are running the command-line interface on a Windows system, perform the following steps.

  1. Close the device simulator, if running.
  2. In a text or code editor, open %localappdata%\Telerik\BlackDragon\CustomDeviceDefinitions.json.
  3. Review the format of the default custom devices.
    The default custom devices are LG Nexus 5 and Samsung Nexus 10.
  4. Insert a comma after the last closing curly bracket (}).
  5. On a new line, add the following code block.

    {
        "Name": " ",
        "Model": " ",
        "Uuid": " ",
        "DeviceSize": {
            "ScreenWidth": ,
            "ScreenHeight": ,
            "ScreenRealWidth": ,
            "ScreenRealHeight": 
        },
        "Label": " ",
        "ToolTip": " ",
        "Identifier": " ",
        "DevicePlatform": " ",
        "UserAgents": [
            {
                "MinVersion": " ",
                "UserAgent": " "
            },
            {
                "MaxVersion": " ",
                "UserAgent": " "
            }
        ],
        "DefaultOsVersion": " ",
        "SupportedOsVersions" : [
            " ",
            " "
        ]
    }
    
  6. Complete the name/value pairs in device template.
    Make sure to preserve the quotation marks, where provided in the template.

    Name Description Sample Value
    Name This is the user-defined name of the device. My Android Phone
    Model This is the device model.
    The simulator returns the value of Model for device.model (Apache Cordova Device).
    XT1053
    Uuid This is the Universally Unique Identifier of the device.
    Set it as a random alphanumeric string.
    The simulator returns the value of Model for device.uuid (Apache Cordova Device).
    e0908060g740012323456732678432de8e601055
    DeviceSize → ScreenWidth This is the width of the device pane displayed in the simulator in pixels.
    Do not set a size that exceeds the width of the display resolution of your system.
    432
    DeviceSize → ScreenHeight This is the width of the device height displayed in the simulator in pixels.
    Do not set a size that exceeds the height of the display resolution of your system.
    768
    DeviceSize → ScreenRealWidth This is the actual width of the device screen in pixels.
    Set the device screen width as listed by the manufacturer, if any.
    1080
    DeviceSize → ScreenRealHeight This is the actual width of the device screen in pixels.
    Set the device screen width as listed by the manufacturer, if any.
    1920
    Label This is the name that the simulator shows in the list of available devices.
    Set a user-friendly name that you will be able to recognize quickly.
    Moto X (Android)
    ToolTip This is the tooltip that the simulator shows in the list of available devices when you hover over the custom device. Run your app on Moto X.
    Identifier This is a unique device identifier that the simulator uses to recognize and load the custom device.
    Set a unique alphanumeric value, no spaces, for Identifier. Otherwise, the simulator cannot load the device.
    The following values are reserved.
    • IPhoneSimulator
    • IPhone5Simulator
    • IPhone6Simulator
    • IPhone6PlusSimulator
    • IPadSimulator
    • AndroidSimulator
    • AndroidTabletSimulator
    • WindowsPhoneSimulator
    • Nexus4Simulator
    • Nexus72013Simulator
    • OneXSimulator
    • Lumia820Simulator
    • Lumia1020Simulator
    • GalaxyS4Simulator
    • GalaxyTabSSimulator
    • XperiaZSimulator
    MyMotoX
    DevicePlatform This is the operating system of the custom device.
    Set any of the following values.
    • Android
    • iOS
    • WP8
    Android
    UserAgents → MinVersion (Optional) From this version above (including), the simulator returns the specified user agent for the device. 4.4
    UserAgents → MaxVersion (Optional) From this version below (including), the simulator returns the specified user agent for the device. 4.3
    UserAgents → UserAgent This is the user agent that the simulator returns for the device.
    Do not hardcode the version of the mobile platform. Otherwise, the simulator returns the hardcoded version instead of the version selected in the Version drop-down menu.
    Set the version of the mobile platform with one of the following placeholders. The simulator automatically replaces the placeholder with the correct version value from your selection in the Versions drop-down menu.
    • Android versions: <version>
    • iOS versions: <version_escaped>
    • Windows Phone versions: <version>
    Mozilla/5.0 (Linux; U; Android <version> ; ko-kr; LG-L160L Build/IML74K) AppleWebkit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30
    DefaultOSVersion This is the version of the operating system with which the simulator loads the custom device.
    Set an existing version of the platform you set in DevicePlatform.
    4.4
    SupportedOsVersions These are the available operating systems versions between which you can switch from the Version drop-down menu.
    Set existing versions of the platform set in DevicePlatform. Make sure to set the value that you set in DefaultOSVersion. Separate versions with a comma and place each version on a new line.
    4.3
  7. Save changes to CustomDeviceDefinitions.json.

The next time you run the simulator, it will let you choose your device from the device drop-down menu → Custom.

If you are running the command-line interface on a macOS system, perform the following steps.

  1. Close the device simulator, if running.
  2. In the terminal, run the following command.

    nano ~/.local/share/Telerik/BlackDragon/CustomDeviceDefinitions.json
    
  3. Review the format of the default custom devices.
    The default custom devices are LG Nexus 5 and Samsung Nexus 10.
  4. Insert a comma after the last closing curly bracket (}).
  5. On a new line, add the following code block.

    {
        "Name": " ",
        "Model": " ",
        "Uuid": " ",
        "DeviceSize": {
            "ScreenWidth": ,
            "ScreenHeight": ,
            "ScreenRealWidth": ,
            "ScreenRealHeight": 
        },
        "Label": " ",
        "ToolTip": " ",
        "Identifier": " ",
        "DevicePlatform": " ",
        "UserAgents": [
            {
                "MinVersion": " ",
                "UserAgent": " "
            },
            {
                "MaxVersion": " ",
                "UserAgent": " "
            }
        ],
        "DefaultOsVersion": " ",
        "SupportedOsVersions" : [
            " ",
            " "
        ]
    }
    
  6. Complete the name/value pairs in device template.
    Make sure to preserve the quotation marks, where provided in the template.

    Name Description Sample Value
    Name This is the user-defined name of the device. My Android Phone
    Model This is the device model.
    The simulator returns the value of Model for device.model (Apache Cordova Device).
    XT1053
    Uuid This is the Universally Unique Identifier of the device.
    Set it as a random alphanumeric string.
    The simulator returns the value of Model for device.uuid (Apache Cordova Device).
    e0908060g740012323456732678432de8e601055
    DeviceSize → ScreenWidth This is the width of the device pane displayed in the simulator in pixels.
    Do not set a size that exceeds the width of the display resolution of your system.
    432
    DeviceSize → ScreenHeight This is the width of the device height displayed in the simulator in pixels.
    Do not set a size that exceeds the height of the display resolution of your system.
    768
    DeviceSize → ScreenRealWidth This is the actual width of the device screen in pixels.
    Set the device screen width as listed by the manufacturer, if any.
    1080
    DeviceSize → ScreenRealHeight This is the actual width of the device screen in pixels.
    Set the device screen width as listed by the manufacturer, if any.
    1920
    Label This is the name that the simulator shows in the list of available devices.
    Set a user-friendly name that you will be able to recognize quickly.
    Moto X (Android)
    ToolTip This is the tooltip that the simulator shows in the list of available devices when you hover over the custom device. Run your app on Moto X.
    Identifier This is a unique device identifier that the simulator uses to recognize and load the custom device.
    Set a unique alphanumeric value, no spaces, for Identifier. Otherwise, the simulator cannot load the device.
    The following values are reserved.
    • IPhoneSimulator
    • IPhone5Simulator
    • IPhone6Simulator
    • IPhone6PlusSimulator
    • IPadSimulator
    • AndroidSimulator
    • AndroidTabletSimulator
    • WindowsPhoneSimulator
    • Nexus4Simulator
    • Nexus72013Simulator
    • OneXSimulator
    • Lumia820Simulator
    • Lumia1020Simulator
    • GalaxyS4Simulator
    • GalaxyTabSSimulator
    • XperiaZSimulator
    MyMotoX
    DevicePlatform This is the operating system of the custom device.
    Set any of the following values.
    • Android
    • iOS
    • WP8
    Android
    UserAgents → MinVersion (Optional) From this version above (including), the simulator returns the specified user agent for the device. 4.4
    UserAgents → MaxVersion (Optional) From this version below (including), the simulator returns the specified user agent for the device. 4.3
    UserAgents → UserAgent This is the user agent that the simulator returns for the device.
    Do not hardcode the version of the mobile platform. Otherwise, the simulator returns the hardcoded version instead of the version selected in the Device → OS Version menu.
    Set the version of the mobile platform with one of the following placeholders. The simulator automatically replaces the placeholder with the correct version value from your selection in the Device → OS Version menu.
    • Android versions: <version>
    • iOS versions: <version_escaped>
    • Windows Phone versions: <version>
    Mozilla/5.0 (Linux; U; Android <version> ; ko-kr; LG-L160L Build/IML74K) AppleWebkit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30
    DefaultOSVersion This is the version of the operating system with which the simulator loads the custom device.
    Set an existing version of the platform you set in DevicePlatform.
    4.4
    SupportedOsVersions These are the available operating systems versions between which you can switch from the Device → OS Version menu.
    Set existing versions of the platform set in DevicePlatform. Make sure to set the value that you set in DefaultOSVersion. Separate versions with a comma and place each version on a new line.
    4.3
  7. Press Ctrl+O to save changes to CustomDeviceDefinitions.json.
  8. Press Enter
  9. Press Ctrl+X to return to the terminal.

The next time you run the simulator, it will let you choose your device from DeviceType.

Example

This is the markup of a sample CustomDeviceDefinitions.json. The markup contains the definitions for the default custom devices and a custom Windows Phone device.

[
  {
    "Name": "LG Nexus 5",
    "Model": "D820",
    "Uuid": "e0908060g740011221af33530138bde8e6010555",
    "DeviceSize": {
      "ScreenWidth": 432,
      "ScreenHeight": 768,
      "ScreenRealWidth": 1080,
      "ScreenRealHeight": 1920
    },
    "Label": "ILG Nexus 5",
    "ToolTip": "Run the application in LG Nexus 5 simulator",
    "Identifier": "Nexus5Simulator",
    "DevicePlatform": "Android",
    "UserAgents": [
      {
        "MinVersion": "4.4",
        "UserAgent": "Mozilla/5.0 (Linux; Android <version>; GT-P1000 Build/HRI83) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Safari/537.36"
      },
      {
        "MaxVersion": "4.3",
        "UserAgent": "Mozilla/5.0 (Linux; U; Android <version>; en-us; GT-P1000 Build/HRI83) AppleWebkit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13"
      }
    ],
    "DefaultOsVersion": "4.4",
    "SupportedOsVersions" : [
      "4.4",
      "4.3"
    ]
  },
  {
    "Name": "Samsung Google Nexus 10",
    "Model": "GT-P8110",
    "Uuid": "e0908060g740012323456732678432de8e601055",
    "DeviceSize": {
      "ScreenWidth": 640,
      "ScreenHeight": 1024,
      "ScreenRealWidth": 1600,
      "ScreenRealHeight": 2560
    },
    "Label": "Samsung Nexus 10",
    "ToolTip": "Run the application in Samsung Google Nexus 10 simulator",
    "Identifier": "Nexus10Simulator",
    "DevicePlatform": "Android",
    "UserAgents": [
      {
        "MinVersion": "4.4",
        "UserAgent": "Mozilla/5.0 (Linux; Android <version>; GT-P1000 Build/HRI83) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Safari/537.36"
      },
      {
        "MaxVersion": "4.3",
        "UserAgent": "Mozilla/5.0 (Linux; U; Android <version>; en-us; GT-P1000 Build/HRI83) AppleWebkit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13"
      }
    ],
    "DefaultOsVersion": "4.4",
    "SupportedOsVersions" : [
      "4.4",
      "4.3",
      "4.2"
    ]
  },
  {
    "Name": "Windows Phone 8x by HTC",
    "Model": "PM23100",
    "Uuid": "e0908060g740012323456732678432de8e601055",
    "DeviceSize": {
      "ScreenWidth": 360,
      "ScreenHeight": 640,
      "ScreenRealWidth": 720,
      "ScreenRealHeight": 1280
    },
    "Label": "HTC Windows Phone 8X",
    "ToolTip": "Run the application in the HTC Windows Phone 8X simulator",
    "Identifier": "HTCWP8X",
    "DevicePlatform": "WP8",
    "UserAgents": [
      {
        "UserAgent": "Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone <version>; Trident/6.0; IEMobile/10.0; ARM; Touch; HTC; Windows Phone 8X by HTC)"
      }
    ],
    "DefaultOsVersion": "8.0",
    "SupportedOsVersions" : [
      "8.0"
    ]
  }
]

Next Steps

Run your app in the device simulator and configure the simulated device.

See Also

Start a free trial Request a demo
Contact us: +1-888-365-2779
sales@telerik.com
Copyright © 2016-2017, Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.