hi, guys:
my app can get the service center number, but when the app is running, if i change the service center number,again. then what my app get is the old one. but if i restart my app, it can get the new one.my code is here.Can anyone help me? thank you in advance.
TBool CMtmsExampleEngine::GetCenterNum(TDes& CnBuf)
{
if(!iSmsMtm)
{
iObserver.SetTextL(_L("No iSmsMtm"));
return EFalse;
}
CSmsSettings& serviceSettings = iSmsMtm->ServiceSettings();
const TInt numSCAddresses = serviceSettings.ServiceCenterCount();
TInt scIndex=0;
if (numSCAddresses > 0)
{
scIndex = serviceSettings.DefaultServiceCenter();
if ((scIndex < 0) || (scIndex >= numSCAddresses))
{
return EFalse;
}
CSmsServiceCenter& serviceCenter = serviceSettings.GetServiceCenter(scIndex);
//TBuf<64> scNum(serviceCenter.Address());
CnBuf.Copy(serviceCenter.Address());
iObserver.SetTextL(CnBuf);
return ETrue;
}
return EFalse;
}



