AndroidDeviceNames icon indicating copy to clipboard operation
AndroidDeviceNames copied to clipboard

Getting Model name instead of marketing name for some devices

Open dikbansal opened this issue 7 years ago • 4 comments

I'm having trouble fetching market names of the phones getting model name instead of marketing name When I view the raw JSON it shows that the market_name and model name are same for some device like Oppo. Please confirm why oppo devices are considered as unrecognized devices in this list.

dikbansal avatar Nov 13 '18 13:11 dikbansal

Which Oppo device? Are you using

DeviceName.getDeviceName()

or

DeviceName.with(context).request(new DeviceName.Callback() {
  @Override public void onFinished(DeviceName.DeviceInfo info, Exception error) {
    ....
  }
});

jaredrummler avatar Nov 13 '18 17:11 jaredrummler

Autually i am getting this issue with oppo F5. I am getting device name of oppo F5 is CPH1723. I have attached a screenshot for reference here model name defines my device name.

Please look in to this issue. screenshot_2018-11-14-18-42-01-68

dikbansal avatar Nov 14 '18 13:11 dikbansal

You can create a PR for this. I am hesitant to do so because I don't know OPPO devices. This is happening because Google doesn't have the correct name matched in their master list.

You would need to add the name to getPreferredDeviceName in JsonGenerator.kt:

private fun getPreferredDeviceName(deviceName: String): String {
  return when (deviceName) {
    "OnePlus3" -> "OnePlus 3"
    ...
    "CPH1723" -> "Oppo F5"
    // Add more devices with incorrect name here
    else -> deviceName
  }
}

jaredrummler avatar Jan 15 '19 22:01 jaredrummler

Oppo and Vivo are very popular Android Phones in China. They are top 5 phones in China and probably top 10 globally. No need to mention Huawei, which is the top 1 now. Is there a plan to update the list? It seems most of these phones can't be properly recognized even it is listed in the Google's supported device.

jifang avatar Apr 04 '19 21:04 jifang