×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jul 2010
    Location
    Colombo,Sri Lanka
    Posts
    3

    Create PIM backup on a remote server

    I'm trying to develop a backup on remote server of PIM details. I wrote an app to read and send contact details of the phone to a remote server via httpconnection. I developed this in sun java WTK 3.0. My app works fine on emulator. Contacts are succesfully transfered and saved to a remote database. But when it is deployed on a mobile devece(Nokia N73, Nokia 6120) , contacts are not transferred succesfully. It is send only one contact. Following is the code i have written;


    while (items.hasMoreElements()) {
    homeNumber="None";
    mobileNumber="None";
    faxNumber="None";
    Contact contact = (Contact) items.nextElement();
    //-------Read data-------------

    int telCount = contact.countValues(Contact.TEL);
    int nameCount = contact.countValues(Contact.NAME);

    if( nameCount>0){
    String []names=contact.getStringArray(Contact.NAME, Contact.ATTR_NONE);
    contactName = names[contact.NAME_GIVEN];

    }else{
    contactName="None";
    //System.out.println("No name"+ "telcount- "+ telCount +", nameCount"+ nameCount +", Name is" +contact.getString(Contact.FORMATTED_NAME, 0) );
    }
    if(telCount>0){
    for (int i = 0; i < telCount; i++){
    int telAttributes = contact.getAttributes(Contact.TEL, i);

    if(telAttributes==Contact.ATTR_HOME){
    homeNumber=contact.getString(Contact.TEL, i);
    }else if(telAttributes==Contact.ATTR_MOBILE){
    mobileNumber=contact.getString(Contact.TEL, i);
    }else if(telAttributes==Contact.ATTR_FAX){
    faxNumber=contact.getString(Contact.TEL, i);
    }else{
    System.out.println("Have no given type of contact numbers");
    }

    }

    }else{
    System.out.println("Have no any type of contact numbers");
    }


    //--------End of reading-------

    System.out.println(contactName +"-->"+mobileNumber);

    String oneEntry=contactName +"-->"+mobileNumber;
    record=oneEntry;
    sb.append(record);
    System.out.println("before writing data");

    dos.writeUTF(oneEntry);

    System.out.println("after writing data");
    dos.flush();
    }


    I'm new to J2ME and appreciate ur feedback.

  2. #2
    Registered User
    Join Date
    Feb 2010
    Posts
    2

    Re: Create PIM backup on a remote server

    How do you read contacts from PIM and send to Remote server

Similar Threads

  1. Remote Symbian Backup
    By sngardner in forum General Development Questions
    Replies: 3
    Last Post: 2008-06-06, 18:19
  2. Create a BACKUP
    By felixksp in forum Symbian
    Replies: 1
    Last Post: 2007-12-27, 12:44
  3. Remote PIM Access On S60 Phones
    By peiling in forum Symbian
    Replies: 5
    Last Post: 2007-07-25, 10:12
  4. PIM Backup
    By dakoz in forum OMA DM/DS/CP
    Replies: 10
    Last Post: 2006-01-26, 13:51
  5. PIM Backup ?
    By dakoz in forum PC Suite API and PC Connectivity SDK
    Replies: 1
    Last Post: 2006-01-25, 12:08

Posting Permissions

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