views:

182

answers:

2

I am looking for a working code snippet for Symbian S60 5th edition in which you can read SIM contact details.

If possible, I would skip using RPhoneBookSession, but if that is the only way, please provide code snippet how to use it.

Thank you.

+2  A: 

What you want is the example code from the relevant chapter of the Quick recipes on Symbian OS book, which you can find here.

EDIT-1:

Should have read the question more carefully.

The CContactDatabase API should synchronize with the SIM Phonebook seamlessly by using RPhoneBookSession so you don't have to.

To figure out what's wrong, I would suggest calling RPhoneBookSession::GetLastSyncError, RPhoneBookSession::GetPhoneBookCacheState and RPhoneBookSession::GetSyncMode.

I would also suggest doing all this both before and after adding a new CContactICCEntry to the database yourself.

Of course, this is all supposing Nokia didn't just brutally disable Phonebook synchronization...

EDIT-2:

If Nokia disabled Symbian's phonebook synchronization, they may have replaced it with their own, which would mean that using the CPbkContactEngine::AllContactsView method could yield different results than the CContactDatabase approach.

Let's face it, though. If the Contacts application provided with the phone doesn't even allow you to save a contact on the SIM, Nokia may have removed all possibilities to interact with the SIM phonebook period.

EDIT-3:

You could try to develop against phbksyncsvr.lib using the binaries in the Product Development Kit (PDK) from the first real version of the Symbian Foundation operating system: Symbian^2. Binary compatibilty between versions of Symbian OS can sometimes help you.

QuickRecipesOnSymbianOS
If you are referring to ContactReadField example and chapter 4.2.3.2, there are no KUidContactICCEntry in the database. I am looking for an example in which I read contacts from the SIM card.
Bojan Milankovic
According to the official documentation, RPhoneBookSession and phbksyncsvr.lib are not part of the S60 5th Edition SDK. How do I get that? Is there a way to get BAK these days?
Bojan Milankovic
I am not familiar with ADK. Are you referring to ADT - Application Development Toolkit? If so, can you point me to the directory where the library is placed?As of the Application Development SDK for the first Symbian Foundation platform - Symbian^1 - this is a copy of the S60 5th Edition SDK v1.0 which does not contain the library and the headers.
Bojan Milankovic
I am getting this error on the PDK download page: "Export Control ErrorThe Symbian Foundation website is headlong into a limited beta phase now, and over the next few weeks we'll be stress testing our geo-targeting systems. While we do this, some of you, whole countries at a time, might have trouble accessing parts of the site. In fact, if you're seeing this message, it's happening right now."Thank you for your help so far.
Bojan Milankovic
Works fine from the UK. Very unfortunate. Might be worth trying every day and asking the foundation to have a wiki page to clarify what they can currently export where...
QuickRecipesOnSymbianOS
A: 

This isn't possible without a private Nokia API.

dd_123