update. it seems that duplicate records are not problem. problem was that the
number was *51. it seems that if number uses some of characters *#+ the its not
found...
is there any way ho to make it work?
Michal Seliga wrote:
> at the moment i use this code to search addressbook for contact by phone
> number
>
> callback:
> static Boolean LookupCallback(void* ref)
> {
> return false;
> }
>
> AddrCallerIDParamsType params;
> SysNotifyParamType notify;
>
> MemSet(¬ify,sizeof(SysNotifyParamType),0);
> MemSet(¶ms,sizeof(AddrCallerIDParamsType),0);
> notify.notifyType=addrAppNotificationCmdCallerID;
> notify.notifyDetailsP=¶ms;
> params.lookupString="some phone number";
> params.callback=LookupCallback;
> CallWithCommand(sysFileTApplication,kPalmOneCreatorIDContacts,sysAppLaunchCm
> if(params.uniqueID)
> {
> //found
> }
> else
> {
> //notfound
> }
>
> problem is that with this code contact is found only if i have it only once
> (when result is unique). for example if i have contact both in SIM
> addressbook and in real addresbook it will return that it didn't found
> anything
>
> for what i need it would be good if i could persuade address aplication to
> return uid of first contact which matches and doesn't care about how many of
> them would match
>
> i am sure its possible..but how?
>
> all this is tested on treo650 so i need something what works there
>
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/