×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor
    Join Date
    Aug 2008
    Location
    Pune
    Posts
    223

    Creating Contact Using PIM

    Hi All,
    Can we create contacts in emulator?
    if yes then tell me possible way for it....

    I am writng function createAContact() as given in Complete Reff. J2ME but while calling this function from midlet it gives null pointer exception.

    my code........

    else if (command == screenCommand1)
    {
    new Contact_Name(this);
    name.createAContact(); //.....error line.....
    }

    error............

    java.lang.NullPointerException
    at Contact.PIMTest.commandAction(PIMTest.java:55)
    at javax.microedition.lcdui.Display$DisplayAccessor.commandAction(Display.java:1992)
    at javax.microedition.lcdui.Display$DisplayManagerImpl.commandAction(Display.java:2822)
    at com.sun.midp.lcdui.DefaultEventHandler.commandEvent(DefaultEventHandler.java:303)
    at com.sun.midp.lcdui.AutomatedEventHandler.commandEvent(AutomatedEventHandler.java:670)
    at com.sun.midp.lcdui.DefaultEventHandler$QueuedEventHandler.run(DefaultEventHandler.java:658)

  2. #2
    Regular Contributor
    Join Date
    Apr 2007
    Posts
    220

    Re: Creating Contact Using PIM

    Hi,

    Yes you can create or in other words add new contact using emulators.

    From the error you are getting it seems to some other p-roblem instead of the PIM related error.

    It will be more helpful if you can post your complete come.

    Regards
    Amit

  3. #3
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,405

    Re: Creating Contact Using PIM

    Hi devdattac,

    from the infos you give it seems that your 'name' variable is null, so you do not correctly initialize it before calling its createAContact() method.

    Pit

  4. #4
    Regular Contributor
    Join Date
    May 2008
    Posts
    68

    Re: Creating Contact Using PIM

    Hi,

    You can create a buissness card .vcf file for contact and read from emulator

    for example
    BEGIN:VCARD
    VERSION:3.0
    EMAIL:4566
    FNoiny
    REV:2008-09-29
    END:VCARD

    or you can see PDADemo of J2ME Wireless Tool Kit

    Thanks

    Ravi

  5. #5
    Nokia Developer Expert
    Join Date
    Jun 2005
    Posts
    923

    Re: Creating Contact Using PIM

    I guess it's pretty obvious that "name" variable is null.

    Daniel

Similar Threads

  1. Problem after creating a contact
    By raul.cicero in forum Symbian C++
    Replies: 3
    Last Post: 2008-04-07, 15:13
  2. Replies: 2
    Last Post: 2008-01-04, 09:58
  3. About PIM read Email from 5300 contact
    By jack_lu in forum Mobile Java General
    Replies: 0
    Last Post: 2007-12-21, 08:23
  4. Problem in build with S60 1FP
    By Manuelito_ in forum Symbian Tools & SDKs
    Replies: 14
    Last Post: 2007-09-18, 12:08
  5. PIM API: updating contact causes a reboot on 6270!
    By suzier in forum Mobile Java General
    Replies: 8
    Last Post: 2007-04-03, 07:29

Posting Permissions

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