vendredi 22 juillet 2016

Sorting the name list in my app - SettingNotFoundException

I'm writing an application which sorts the names of employees based on the user's selection in his/her Contacts settings.

I have implemented the following code in my application for fetching the sort order from device's Contacts:

int sortOrder = 0;

try{
sortOrder = android.provider.Settings.System.getInt(context.getContentResolver(), "android.contacts.DISPLAY_ORDER");
} catch (android.provider.Settings.SettingNotFoundException e) {
Log.e("Setting Not Found", e.getMessage());
}
My application is working fine with below 5.0 version devices, but i have a problem with Nexus5 (6.0). It always throws:

android.provider.Settings$SettingNotFoundException: android.contacts.DISPLAY_ORDER

Can any one please help me to resolve this issue?

Let's block ads! (Why?)



Sorting the name list in my app - SettingNotFoundException

Aucun commentaire:

Enregistrer un commentaire