Problem in contact listener please help it's urgent!!!
| Wed, 2008-06-04 18:41 | |
|
Hi In this code appClosed comes when we add new contact in phone book, i don't now what is the problem. this exe wait in back ground and any event comes in phonebook, HandleDatabaseEventL function listen, but ptint_int(4) not show 4 but 3 shows when exe invoke. Please help me, my requirement is that if any contact add or change in phone book, i want it contact id. CContactReader :: CContactReader() //==============================================================// void CContactReader:: ConstructL() void CContactReader::HandleDatabaseEventL(TContactDbObserverEvent aEvent) switch(aEvent.iType) |
|






Forum posts: 167
Hi kalpi21amit,
Go through below link:-
http://discussion.forum.nokia.com/forum/showthread.php?t=20171
&
http://wiki.forum.nokia.com/index.php/Getting_Contact_Database_Change_Event
Hopefully this will help you.
Thanks & Regards,
Md.Khalid Ahmad
Forum posts: 11
thanks khalid,
I am using like this, but App closed when any we do any changes in contacts, i do'nt know why, HandleDataBaseEventL is not calling. Please help me.
Forum posts: 463
Knowing what error the app closes with might help understand better what might be happening. Debugging is also a great choice to see if the flow is as intended.
Forum posts: 11
Hi it is solved, thanks
Forum posts: 463
And wouldnt you want to share your solution with others who might be looking out for same solution. I often tell developers to search as most of the issues are discussed earlier. If all the threads ended with a 'i solved it' and no indication of what solution solved it,....well imagine!!
Forum posts: 11
Thanks Neil,
Sorry for that.
problem is following code in bold part
CContactChangeNotifier* DatabaseNotifier =CContactChangeNotifier::NewL(*ContactDatabase , iContactDatabaseObserver[b]);
Solution is there. just pass this instead of iContactDatabaseObserver.
CContactChangeNotifier* DatabaseNotifier =CContactChangeNotifier::NewL(*ContactDatabase ,this);