getPlatformName static method

String getPlatformName()

Retrieves the platform name.

Returns a string representing the platform name (e.g., "Android", "iOS").

Example:

String platformName = EaseDevice.getPlatformName();

Implementation

static String getPlatformName() {
  if (Platform.isAndroid) {
    return 'Android';
  } else if (Platform.isIOS) {
    return 'iOS';
  } else if (Platform.isWindows) {
    return 'Windows';
  } else if (Platform.isLinux) {
    return 'Linux';
  } else if (Platform.isMacOS) {
    return 'macOS';
  } else {
    return 'Unknown';
  }
}