Miscellaneous

Set the Status Bar Style (iOS Only)

MyDataHelps.setStatusBarStyle(style)

See the iOS status bar style documentation.

Parameters

style string (required)

Allowed values are darkContent, lightContent, and default. If you want the status bar to appear in white, pass lightContent to this action.

Availability

MyDataHelps Applications
Web View Steps

Get Information about the Current Device

MyDataHelps.getDeviceInfo()

Returns

Promise<DeviceInfo>

Resolves to a result object containing device info fields.

result.identifier guid

Unique identifier for device. On web browsers, this is kept in a cookie which can sometimes be reset.

result.platform string

Describes how the participant is accessing the application.

result.properties object

Platform-specific fields providing additional information about the device.

Availability

MyDataHelps Applications
Web View Steps
Example: Getting Device Info on Various Platforms
MyDataHelps.getDeviceInfo()
	.then( function(result) {
		console.log(result);
	} );
Output from Chrome on Windows 10
{
	"identifier": "4ef563af-647b-451d-92c2-8acb41e2b2f5",
	"platform": "Web",
	"properties":
	{
		"Browser": "Chrome",
		"BrowserVersion": "89.0.4389.114",
		"OperatingSystem": "Windows",
		"Resolution": "1920 x 1080"
	}
}
Output from MyDataHelps on iOS (native)
{
  "identifier": "D4CDB2C5-13A6-4911-810F-688EF90DDCAA",
  "platform": "iOS",
  "properties": 
  {
    "TextingCapability": "Available",
    "NotificationAlertSetting": "Enabled",
    "AppVersion": "2021.7",
    "NotificationBadgeSetting": "Enabled",
    "NotificationAuthorizationStatus": "Authorized",
    "NativeResolution": "828 x 1792",
    "LocationAccuracyAuthorizationStatus": "Full",
    "LocationAuthorizationStatus": "AuthorizedAlways",
    "AppName": "MyDataHelps",
    "iOSVersion": "14.4.2",
    "HardwareModel": "iPhone11,8",
    "DeviceType": "mobile",
    "MovementDisorderStatus": "Unknown",
    "NotificationSoundSetting": "Enabled",
    "Resolution": "414 x 896"
  }
}
Output from MyDataHelps on Android (native)
{
  "identifier": "5dc2a1f1-fb2e-4449-837b-6babd2722282",
  "platform": "Android",
  "properties":
  {
    "AppName": "MyDataHelps",
    "NativeResolution": "900 x 1600",
    "Resolution": "450 x 776",
    "HardwareModel": "SM-G955N",
    "AppVersion": "2021.14",
    "DeviceType": "mobile",
    "AndroidVersion": "7.1.2"
  }
}

Get the Current Language

MyDataHelps.getCurrentLanguage()

Returns

lang string

The language code configured on the current device, to be used when determining what language to show content in. In the native apps, this will be the language the device itself is configured for. On web, the user is given an option to choose the language they view MyDataHelps in. Formatting is device-dependent. For example, Chrome on Windows 10 may return ‘en’, the iOS native app ‘en-us’, and the Android native app ‘en-US’.

Availability

MyDataHelps Applications
Web View Steps