×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Nov 2008
    Posts
    411

    How to get the new service center number of the phone?

    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;
    }

  2. #2
    Regular Contributor
    Join Date
    Nov 2008
    Posts
    411

    Re: How to get the new service center number of the phone?

    hi, guys:
    i have solved it by myself:
    add this before last code:
    iSmsMtm->RestoreServiceAndSettingsL();

Similar Threads

  1. Nokia Gamer (GamR) - concept phone
    By tgm91 in forum General Development Questions
    Replies: 4
    Last Post: 2008-10-01, 21:34
  2. Dialling a phone number from J2ME midlet
    By anand_amarsh in forum Mobile Java General
    Replies: 3
    Last Post: 2008-08-04, 12:45
  3. Can I test SMS receiver on the phone without port number?
    By brighteyes in forum Mobile Java General
    Replies: 10
    Last Post: 2007-11-26, 23:38
  4. Replies: 0
    Last Post: 2003-12-30, 20:32

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •