1. Download our Official Android App: Forums for Android!

Apps Sorting the name list in my app - SettingNotFoundException

Discussion in 'Android Development' started by raveeshlawrance, Jul 22, 2016.

  1. raveeshlawrance

    Thread Starter
    Rank:
    None
    Points:
    6
    Posts:
    9
    Joined:
    Jul 22, 2016

    Jul 22, 2016
    9
    1
    6
    Male
    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?
     

    Advertisement

  2. scary alien

    scary alien not really so scary
    Moderator
    Rank:
     #8
    Points:
    2,138
    Posts:
    22,298
    Joined:
    Mar 5, 2010

    Mar 5, 2010
    22,298
    23,695
    2,138
    Male
    space alien ;)
    Indy
    Welcome to our AndroidForums, @raveeshlawrance.

    I've moved your thread over here to our Application Development area for you where you'll get some more targeted views and responses.

    Cheers!
     
  3. raveeshlawrance

    Thread Starter
    Rank:
    None
    Points:
    6
    Posts:
    9
    Joined:
    Jul 22, 2016

    Jul 22, 2016
    9
    1
    6
    Male
    Thanks a lot.
     
  4. raveeshlawrance

    Thread Starter
    Rank:
    None
    Points:
    6
    Posts:
    9
    Joined:
    Jul 22, 2016

    Jul 22, 2016
    9
    1
    6
    Male
    Any help would be appreciated. Could any one please help me to resolve this?
     
  5. raveeshlawrance

    Thread Starter
    Rank:
    None
    Points:
    6
    Posts:
    9
    Joined:
    Jul 22, 2016

    Jul 22, 2016
    9
    1
    6
    Male
  6. raveeshlawrance

    Thread Starter
    Rank:
    None
    Points:
    6
    Posts:
    9
    Joined:
    Jul 22, 2016

    Jul 22, 2016
    9
    1
    6
    Male
    Team we are in production move and we need to close this as much as possible. anyone hlpe me please
     
  7. LV426

    LV426 I say we take off and nuke this place from orbit
    Moderator
    Rank:
     #11
    Points:
    1,988
    Posts:
    7,873
    Joined:
    Oct 16, 2015

    Oct 16, 2015
    7,873
    11,508
    1,988
    Male
    Software developer
    South West of England
    It appears that nobody here knows the answer to your question. Have you tried asking on StackOverflow?
     
  8. raveeshlawrance

    Thread Starter
    Rank:
    None
    Points:
    6
    Posts:
    9
    Joined:
    Jul 22, 2016

    Jul 22, 2016
    9
    1
    6
    Male
    I tired there as well, but no luck :) thanks a lot
     
  9. scary alien

    scary alien not really so scary
    Moderator
    Rank:
     #8
    Points:
    2,138
    Posts:
    22,298
    Joined:
    Mar 5, 2010

    Mar 5, 2010
    22,298
    23,695
    2,138
    Male
    space alien ;)
    Indy
    I've not coded or used anything like this, but it kind of sounds / looks to me like it might be a permissions issue / change that might have occurred in 6.0? (i.e., is there someone else you need to request (permission-wise) for 6.0?)
     
  10. raveeshlawrance

    Thread Starter
    Rank:
    None
    Points:
    6
    Posts:
    9
    Joined:
    Jul 22, 2016

    Jul 22, 2016
    9
    1
    6
    Male
    I tried all the possible ways, runtime permission manifest permissions but still its throwing exception. Thanks a lot for your reply
     
    scary alien likes this.
  11. raveeshlawrance

    Thread Starter
    Rank:
    None
    Points:
    6
    Posts:
    9
    Joined:
    Jul 22, 2016

    Jul 22, 2016
    9
    1
    6
    Male

Share This Page

Loading...