Function getDeviceName

Synopsis

#include <src/easylogging++.h>

static std::string getDeviceName(void)

Description

Reads android device name.

Source

Lines 1055-1064 in src/easylogging++.cc. Line 1155 in src/easylogging++.h.

std::string OS::getDeviceName(void) {
  std::stringstream ss;
  std::string manufacturer = getProperty("ro.product.manufacturer");
  std::string model = getProperty("ro.product.model");
  if (manufacturer.empty() || model.empty()) {
    return std::string();
  }
  ss << manufacturer << "-" << model;
  return ss.str();
}





Add Discussion

Log in to comment