getDeviceHostname method

Future<String> getDeviceHostname()

Fetches the device's hostname as set by DeviceHostnameTemplate policy. If the current user is not affiliated or no hostname has been set by the enterprise policy, returns an empty string. |callback| : Called with hostname of the device.

Implementation

Future<String> getDeviceHostname() async {
  var $res = await promiseToFuture<String>(
      $js.chrome.enterprise.deviceAttributes.getDeviceHostname());
  return $res;
}