Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting Model name instead of marketing name for some devices #23

Open
dikbansal opened this issue Nov 13, 2018 · 4 comments
Open

Getting Model name instead of marketing name for some devices #23

dikbansal opened this issue Nov 13, 2018 · 4 comments

Comments

@dikbansal
Copy link

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.

@jaredrummler
Copy link
Owner

jaredrummler commented Nov 13, 2018

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) {
    ....
  }
});

@dikbansal
Copy link
Author

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

@jaredrummler
Copy link
Owner

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
  }
}

@jifang
Copy link

jifang commented Apr 4, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@jifang @jaredrummler @dikbansal and others