I'm using ContactsContract.CommonDataKinds.Phone.getTypeLabel to get the String of the phone type of the user (1 --> home, 2 --> mobile, 3 --> work, etc.).
(我正在使用ContactsContract.CommonDataKinds.Phone.getTypeLabel来获取用户电话类型的字符串(1->家庭,2->手机,3->工作等)。)
Everything seem to work fine on most devices, but on Motorola devices the returned strings are some weird chars I can't even type here (looks like Korean/Japanese/Thai). (在大多数设备上,一切似乎都可以正常工作,但是在摩托罗拉设备上,返回的字符串是一些我甚至不能在此处键入的奇怪字符(看起来像韩文/日文/泰文)。)
The locale of those devices is English and users also can't understand those weird strings. (这些设备的语言环境为英语,用户也无法理解这些奇怪的字符串。)
My code is straight forward:
(我的代码很简单:)
return ContactsContract.CommonDataKinds.Phone.getTypeLabel(context.getResources(), type, "").toString();
ask by user2634975 translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…