How to get the highlighted contact details
Hello All,
I want to know which item is currently highlighted in contacts lists.
i.e i want to get details of the current highlighted contacts.
I m able to read all contacts from the list.but i dont know hw can i get the informaion of current highlighted item.
Can Anyone please help me in this?
Re: How to get the highlighted contact details
check the article:
[URL="http://www.forum.nokia.com/info/sw.nokia.com/id/6712cedc-dadb-484f-af14-524b430f132d/Symbian_OS_Using_Contacts_APIs_v1_0_en.pdf.html"]http://www.forum.nokia.com/info/sw.nokia.com/id/6712cedc-dadb-484f-af14-524b430f132d/Symbian_OS_Using_Contacts_APIs_v1_0_en.pdf.html[/URL]
Re: How to get the highlighted contact details
[QUOTE=JackSu;577171]check the article:
[URL="http://www.forum.nokia.com/info/sw.nokia.com/id/6712cedc-dadb-484f-af14-524b430f132d/Symbian_OS_Using_Contacts_APIs_v1_0_en.pdf.html"]http://www.forum.nokia.com/info/sw.nokia.com/id/6712cedc-dadb-484f-af14-524b430f132d/Symbian_OS_Using_Contacts_APIs_v1_0_en.pdf.html[/URL][/QUOTE]
Thanks brother,
But i think i have nt properly explained my requirement.
Now will try to explain it properly.
suppose i m on my phone contact list.
now here i hv highlihted a item.
now i want to get informatin abt that item.
pls remember tht this contact list is nt mine its phone inbuild contact list.
hope u understand it brother.
Can anyone else have an answer?
Re: How to get the highlighted contact details
According to an other thread, you might get the related API via API partnering ([url]http://wiki.forum.nokia.com/index.php/S60_API_Partnering_Program[/url]) starting from S60 3rd FP2. For some reason it is not available for earlier releases.
Re: How to get the highlighted contact details
[QUOTE=wizard_hu_;577299]According to an other thread, you might get the related API via API partnering ([url]http://wiki.forum.nokia.com/index.php/S60_API_Partnering_Program[/url]) starting from S60 3rd FP2. For some reason it is not available for earlier releases.[/QUOTE]
thanks brother.
Re: How to get the highlighted contact details
DO any one else have some suggstion s for this?
without using API parteneringg.
Re: How to get the highlighted contact details
Can Anybody atleast tell me how can i recieved events from contactlist.?
Events which are generted when i move up and down in contact list.
Please help,,,,,,,
Re: How to get the highlighted contact details
You can always go for hacks like key capturing (just search for [b]capture key[/b] in the Wiki). Then you can check the contents of the screen to find out what the user is doing - it should not be as complex as a full OCR implementation, because you can get hints from the contacts database about what to check for.
But it is still not easy of course.
Re: How to get the highlighted contact details
hello dinesh and wizard....
i am looking for the same thing also...
i have used some apis like.
[CODE]TContactItemId itemid = iContactDb->GetCurrentItem();[/CODE]
iContactDb is the default database.
here i am getting the -1 itemid value....I am unable to understand from the sdk what exactly iContactDb->GetCurrentItem() does.
and
[CODE]
TContactItemId ownCardId = iContactDb->OwnCardId();
CContactItem* contact = NULL;
contact = iContactDb->ReadContactL(ownCardId);
int indexvalue = contact->CardFields().Find(KUidContactFieldGivenName);[/CODE]
it freeze on line contact = iContactDb->ReadContactL(ownCardId);
i am cofused according to the sdk it should work for getting the current contact item.
please be helpfull for me ....
what the above apis does ..is they are used for the same purpose or they do something else...???
Re: How to get the highlighted contact details
iContactDb is your own instance of the database/view. Thus it will report the item you (your code) have navigated to. The default is -1 (KNullContactId).
EDIT:
Which part of its description[QUOTE=SDK Help]Gets the ID of the current item, as set by SetCurrentItem(). The current item ID is initialised to KNullContactId when the database is opened[/QUOTE]is the one requiring further explanation?
Re: How to get the highlighted contact details
[QUOTE=wizard_hu_;577475]You can always go for hacks like key capturing (just search for [b]capture key[/b] in the Wiki). Then you can check the contents of the screen to find out what the user is doing - it should not be as complex as a full OCR implementation, because you can get hints from the contacts database about what to check for.
But it is still not easy of course.[/QUOTE]
hi wizard hu,
can u be specific and throw some more light on this?
as per i get u r saying me tht i need to capture the events globally.
and than find out if contact list application is in foreground or not.
and than do the things accordingly.
Re: How to get the highlighted contact details
Tracking the foreground application is also documented in the Wiki, just search for [b]foreground[/b].
However after that comes the problematic part: you have to find out which contact has the focus, based on the contents of the screen. Although you can definitely benefit from catching all possible keyboard events (and practically feed them to a "shadow contact book" maintained by your application), thus you can have some idea what to expect to be found on the screen, in order to go for sure you will still have to capture the contents of the screen, and match at least a part of it to your shadow copy. Although it should be both faster and easier than doing full OCR, it still takes some time and requires processing power.