C/C++ Examples

Home

PIMExample

This example application demonstrates how to add, modify and remove a new contact from an address book and how to read contacts from address book.



This example is included in the MoSync SDK installation in the /examples folder. For information on importing the examples into your workspace, see Importing the Examples.

Behaviour

When this application is started a new contact will be added to a contacts list. All available contact fields will be filled with values.

At the next step the first address value from the new created contact will be modified. After that the new contact will be removed from the list. At this point user has two options:

  1. Print the next contact from the list.
  2. Close the contact list and start again the whole process(add a new contact, modify address field etc).

In the Code

The project is divided into several files. A brief description of the each file's content is as follows:

  1. Main.cpp: Application's main entry point.
  2. AppMoblet.h and AppMoblet.cpp: These files contain code for adding, modifying and removing a contact from a contact list.
  3. PIMContact.h and PIMContact.cpp: These files contain code for adding and removing values from a contact, printing a contact on the screen and modifying address field.
  4. Util.h and Util.cpp: These files contain field values for the new contact and methods for handling and printing error codes.

Touch responses

  • The application is exited by pressing the Back button.
  • When printing or adding values to a contact user can tap on the screen to go at the next field.
  • Drag on the screen from left to right to print the next contact.
  • Drag on the screen from right to left to close the contacts list.

 

 

MoSync SDK 3.3
Copyright © 2013 MoSync AB
www.mosync.com