jaredrummler / AndroidDeviceNames

A small Android library to get the market name of an Android device.
Apache License 2.0
1.38k stars 184 forks source link

Trouble fetching device market names #19

Open Zishan3165 opened 6 years ago

Zishan3165 commented 6 years ago

I'm having trouble fetching some market names of the phones where the model is returned When I view the raw JSON it shows that the market_name exists but in code it comes off same as the model.

{
"manufacturer": "Xiaomi",
"market_name": "HM Note 2",
"codename": "hermes",
"model": "Redmi Note 2"
}

eg

DeviceName.with(this).request { info, error ->
            val manufacturer = info.manufacturer 
            val name = info.marketName
            val model = info.model
            val codename = info.codename
            val deviceName = info.name

Here, the name returns Redmi Note 2 (should return HM Note 2) and model also returns Redmi Note 2

jaredrummler commented 5 years ago

It looks like both QUBO and Xiaomi have a device with the codename hermes. However, I don't see Redmi Note 2 used as a market_name anywhere. Are you sure you using the marketName and not the model?