4

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.

Bojan Milankovic
  • 847
  • 3
  • 11
  • 23

2 Answers2

2

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.

michael aubert
  • 6,836
  • 1
  • 16
  • 32
  • 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 Jan 15 '10 at 10:43
  • 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 Jan 15 '10 at 12:10
  • 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 Jan 15 '10 at 23:23
  • I am getting this error on the PDK download page: "Export Control Error The 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 Jan 20 '10 at 00:33
  • 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... – michael aubert Jan 20 '10 at 11:13
0

This isn't possible without a private Nokia API.

dd_123
  • 1