Inside "Contacts" -> "Settings" in android, we have "Sort list by" and "view contact name as" options. Is there any way of obtaining these preferences inside another app? Meaning my app has my own version of a contact list. I need these in order to sort it accordingly.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
int sort_order =
Settings.System.getInt(getContentResolver(),ContactsContract.Preferences.SORT_ORDER);
inr display_order =
Settings.System.getInt(getContentResolver(),ContactsContract.Preferences.DISPLAY_ORDER);