1

I want to get all hardware information from my android device, I know the existence of Build class but the data seems to be incomplete (or I don't know where I have to look).

My Phone model is Xiaomi Poco X3 NFC:

override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    setContentView(R.layout.activity_sistema)

    findViewById<TextView>(R.id.textView14).apply {   --> surya_eea
      text = Build.PRODUCT
    }
    findViewById<TextView>(R.id.textView13).apply {  --> POCO
      text = android.os.Build.BRAND
    }
    findViewById<TextView>(R.id.dispositivo).apply {  --> surya
      text = android.os.Build.DEVICE
    }
    findViewById<TextView>(R.id.fabricante).apply{  --> XIAOMI
      text= Build.MANUFACTURER
    }
    findViewById<TextView>(R.id.modelo).apply {     --> M2007J20CG
      text = android.os.Build.MODEL
    }

The problem is that I can't find a way to get "X3 NFC"

k1k4ss0
  • 139
  • 4
  • 1
    please check [this question](https://stackoverflow.com/q/1995439/7948109) – Rahul Gaur Dec 11 '21 at 10:54
  • 1
    It's up to the manufacturer to set that info in those strings, if they've just written it as the model code, that's all they've given you unfortunately - you'd need to refer to another lookup to map codes to marketing names. There's a nice trick in Rahul's linked answer grabbing the name displayed by Bluetooth, if you're already using that, but the number of answers in there should make it obvious this is kind of an issue in general (someone in there even wrote a library for it) – cactustictacs Dec 11 '21 at 17:07

0 Answers0