Reading SIM contacts: working!
| Mon, 2003-12-01 18:14 | |
|
Hi,
thanks for your suggestions. Now, with etelbgsm.h, my code reads contacts in the SIM card. But... it is working only on the Nokia 7650, with Symbian 6.0, but not on the Nokia 6600 with Symbian 7.0. Is there a way to do the same on the Nokia 6600? This is the code for Nokia 7650: ================================================== CCommsDatabase* db = CCommsDatabase::NewL(EDatabaseTypeUnspecified); CleanupStack::PushL(db); CCommsDbTableView* table = db->OpenTableLC(TPtrC(MODEM)); table->GotoFirstRecord(); TBuf<255> KTsyName; TBuf<100> name; table->ReadTextL(TPtrC(MODEM_TSY_NAME),KTsyName); // Cleanup - CommsDB no longer needed CleanupStack::PopAndDestroy(2); // table,db // Connect to the ETel server RTelServer aTelServer; User::LeaveIfError(aTelServer.Connect()); CleanupClosePushL(aTelServer); User::LeaveIfError(aTelServer.LoadPhoneModule(KTsyName)); TInt numberOfPhones; User::LeaveIfError(aTelServer.EnumeratePhones(numberOfPhones)); for (TInt i=numberOfPhones; i>0; i--) { // Get the phone name RTelServer::TPhoneInfo phoneInfo; User::LeaveIfError(aTelServer.GetPhoneInfo(i-1,phoneInfo)); // Open the phone by name RBasicGsmPhone phone; User::LeaveIfError(phone.Open(aTelServer,phoneInfo.iName)); RGsmPhoneBook myBook; User::LeaveIfError(myBook.Open(phone, SIM_PHONEBOOK)); RGsmPhoneBook::TEntry entry; TInt test = myBook.ReadFirst(entry); CleanupClosePushL(phone); name = entry.iText; } CleanupStack::PopAndDestroy(2); ============================================================ Thanks. Fabio |
|






Forum posts: 35
U can access sim phonebook in SDK 2.0 using PhoneBook Synchronizer that provides an interface to access/modify SIM contacts.
BTW, did U manage to write contact into SIM using SDK 1.2?
I've managed but something goes wrong and the SIM phonebook is no more accessible (ErrorCode = -14) for further operation.
I often regret my speech, I never regret my silence
Forum posts: 5
my application only read contacts from SIM, without error.
Do you have a code sample (or help links) about PhoneBook Synchronizer?
Thanks.
Fabio
Forum posts: 35
I also manage to read contacts into SIM...the problem comes after a write operation.
Sorry,
Fabrizio.
I often regret my speech, I never regret my silence
Forum posts: 1
could you tell me where i can find all etelbgsm.h .lib ... stuff or send them
to simopaolo@hotmail.com .
Thanks a lot
Paolo
Forum posts: 34
Did you recieve from somebody this lib and .h file. If you have this files please send they to me
My mail is dilian@unicoders.biz
Thanks a lot!
Forum posts: 176
If you don't find them, tell me. This case, i will look on Monday at work...
Bye;
CG