Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7832721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T12:22:27+00:00 2026-06-02T12:22:27+00:00

I am using Titanium to develop a mobile app. I have stuck in a

  • 0

I am using Titanium to develop a mobile app. I have stuck in a problem, where i want to show contact list. I used the following code to show contact list

Titanium.Contacts.showContacts({ });

I am getting the contact list, but it shows in sorting order of last name . I want the list to be shown in sorting order of first name.

Any help will be appreciated

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T12:22:29+00:00Added an answer on June 2, 2026 at 12:22 pm

    there is a property Ti.Contacts.CONTACTS_SORT_FIRST_NAME hope this helps. There is also CONTACTS_KIND_ORGANIZATION, and CONTACTS_KIND_PERSON.

    var g = Ti.Contacts.getAllGroups( );//Getting all the groups on the contacts table
    
    var m = g[0].members();//select a group and check if it has members
    Ti.API.info(m)// my group was empty so i have to add people
    
    var p = Ti.Contacts.getAllPeople( )// get all the contacts
    for (var i in p){//group and add people to your group
        g[0].add(p[i]);
        Ti.API.info(p[i].firstName);
        Titanium.Contacts.save()// you have to save new changes in IOS
    }
    g[0].sortedMembers(Ti.Contacts.CONTACTS_SORT_FIRST_NAME);// FINALLY WE CAN SORT
    
    m = g[0].members();//   get the members 
    
    for (var i in m){// verify they are in order
        Ti.API.info(m[i].firstName);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to parse following JSON using Titanium Appcelerator Mobile SDK [{City:null,Distance:469,Email:null,Latitude:0,Longitude:0,Name:Cretin-Derham Hall,PhoneNo:null,SchoolId:75,State:null,Zip:null},{City:null,Distance:213,Email:null,Latitude:0,Longitude:0,Name:East Ridge,PhoneNo:null,SchoolId:76,State:null,Zip:null},{City:null,Distance:26,Email:null,Latitude:0,Longitude:0,Name:Hastings,PhoneNo:null,SchoolId:78,State:null,Zip:null},{City:null,Distance:116,Email:null,Latitude:0,Longitude:0,Name:Stillwater,PhoneNo:null,SchoolId:81,State:null,Zip:null},{City:null,Distance:0,Email:null,Latitude:0,Longitude:0,Name:White
I have a JSON that contains the following: {p1:{debris:{titanium:0,silicum:0}},p2:{debris:{titanium:0,silicum:0}}... I declare the data using
Hope this makes sense, I am using Titanium mobile to build an iPhone app.
I'm using Titanium to develop an Android/Ipad app. I can't find the exact dp
I'm creating android app using Titanium mobile. How do I create this interface using
I am developing an application using titanium mobile. On the simulator, the app works
I am writing a mobile project using Titanium. I have a question about the
I'm building an iPhone app using Titanium Mobile and using the HTTPClient. Whenever I
We are developing an app using Appclerator titanium. We have a free version of
i'm using Titanium to develop a dictionary. I have a Tableview and the values

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.