This page was last modified 13:35, 8 December 2007.
How to know the tsy name programatically on a specific device
From Forum Nokia Wiki
In order to load a tsy on a device, we need to pass a device specific tsy name, i.e erigsm.tsy, to RTelServer::LoadPhoneModule(). Without hard coding the name of the tsy and keep the code as portable as possible,knowing the tsy name programatically on a specific device will be a lot helpful.
This can be programatically retrieved, since tsy name is stored in the commdb in the modem bearer table for phone and SMS services.
The following code can be useful to get the tsy name:
CCommsDatabase* const db = CCommsDatabase::NewL(EDatabaseTypeUnspecified);
CleanupStack::PushL(db); // PUSH
TUint32 modemId = 0;
//Find the modem bearer for phone and SMS service.
db->GetGlobalSettingL(TPtrC(MODEM_PHONE_SERVICES_SMS), modemId);
// PUSH
CCommsDbTableView* const view =
db->OpenViewMatchingUintLC(TPtrC(MODEM), TPtrC(COMMDB_ID), modemId);
TInt err = view->GotoFirstRecord();
User::LeaveIfError(err);
TFileName tsyName;
view->ReadTextL(TPtrC(MODEM_TSY_NAME), tsyName);
User::LeaveIfError(telServer.LoadPhoneModule(tsyName));
CleanupStack::PopAndDestroy(2, db); // view & db
--
| Related Discussions | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Determine if a phone has JAVA or not | jeswt | Mobile Java General | 4 | 2007-10-06 01:18 |
| Setting the passcode key while pairing with GPS receiver? | mayur_24 | Symbian Networking & Messaging | 3 | 2006-10-04 08:06 |
| unable to dial a number | shivsharad | General Symbian C++ | 5 | 2007-10-10 11:44 |
| Do I have to use MIDPs specific to each and every phone? | musaul | Mobile Java Tools & SDKs | 2 | 2003-04-02 21:25 |
| page per device | RamiX | General Browsing | 5 | 2007-07-26 01:19 |
