×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Dec 2009
    Location
    chennai
    Posts
    137

    Question Doubt in add category?

    Hi,

    String[] category = contact.getCategories();
    It returns string[] while retrieve contact.
    but while restore we cant add the string[] value,
    contact.addToCategory("Personal"); // pass the category
    For example, im adding two category "Personal" and "Friend".
    while retrieve, i will get these category.
    But while restore, how to add these two category?
    Bharath... :)

  2. #2
    Registered User
    Join Date
    Oct 2009
    Location
    Noida
    Posts
    941

    Re: Doubt in add category?

    Quote Originally Posted by bhakki View Post
    Hi,
    It returns string[] while retrieve contact.
    but while restore we cant add the string[] value,

    For example, im adding two category "Personal" and "Friend".
    while retrieve, i will get these category.
    But while restore, how to add these two category?
    Please explain whats the actual need, you need to add a category name at the time you are adding a new contact ?
    Thanks,
    Ekta

  3. #3
    Registered User
    Join Date
    Dec 2009
    Location
    chennai
    Posts
    137

    Re: Doubt in add category?

    I created a contact with two categories. ("Personal" and "Friend").
    I get the groups while retrieving contacts as String[].
    But How to restore these groups into the contact?
    Because contact.addToCategory only allows string value.
    I used following code for add the groups into mobile. but contact not saved while using this code.
    String[] group = PhonebookUtils.stringSplit(groups, ","); // groups = categories value
    for (int i = 0; i < group.length; i++) {
    if (contacts.isCategory(group[i])) {
    contact.addToCategory(group[i]);
    }
    }
    Last edited by bhakki; 2010-10-29 at 08:22.
    Bharath... :)

Similar Threads

  1. game category
    By doomer999 in forum Mobile Java General
    Replies: 6
    Last Post: 2011-03-15, 21:29
  2. Category and kxml2?!
    By xmenus in forum Mobile Java General
    Replies: 2
    Last Post: 2010-07-23, 17:02
  3. Add new Category to PIM event List
    By wotcha in forum Mobile Java General
    Replies: 5
    Last Post: 2010-03-24, 21:49
  4. Category information and Synchronization
    By gdartigu in forum Tools and SDK Feedback (Closed)
    Replies: 0
    Last Post: 2007-05-14, 10:54
  5. Nokia-MIDlet-Category
    By cs8st in forum Mobile Java General
    Replies: 1
    Last Post: 1970-01-01, 02:00

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •