[英]How to execute different code based on the device manufacturers?
I want to execute different codes for different device manufacturers. 我想为不同的设备制造商执行不同的代码。
I know I can do it by using Build.MODEL
and then check which model is that user using. 我知道我可以通过使用
Build.MODEL
然后检查该用户使用的模型来做到这一点。
But the main problem is suppose 但是主要问题是
LG Optimus Zone 3
would return VS425PP
LG Optimus Zone 3
将返回VS425PP
Samsung J7 Prime
would return J7 Prime
Samsung J7 Prime
将返回J7 Prime
Samsung J7 2016 Edition
would return SM-J710F
Samsung J7 2016 Edition
将返回SM-J710F
ZTE Z798BL
would return Z798BL
ZTE Z798BL
将退回Z798BL
In the above cases is would be difficult to find out which manufacturer does that device belong to. 在上述情况下,将很难找出该设备属于哪个制造商。
Can Any one please help with this. 任何人都可以帮忙吗?
Why don't you just read it from android.os.Build.Manufacturer or android.os.Build.Brand? 您为什么不只从android.os.Build.Manufacturer或android.os.Build.Brand阅读? https://developer.android.com/reference/android/os/Build.html?hl=ja
https://developer.android.com/reference/android/os/Build.html?hl=ja
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.