×

Discussion Board

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

    How to set the service center number of the phone?

    hi,guys:
    i know how to get the service number of the phone,but i want to know how to set service center number of the phone? I mean not using AT command.thank you in advance.
    this linkrovide a way to set the service number when you send a msm, but not set the service of the phone.
    http://discussion.forum.nokia.com/fo...ad.php?t=85284
    Last edited by moren123; 2009-02-18 at 06:40.

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

    Re: How to set the service center number of the phone?

    help, Does anyone know how to solve it?

  3. #3
    Registered User
    Join Date
    Jun 2009
    Posts
    4

    Re: How to set the service center number of the phone?

    Here my code can solve it for s60 v3

    TBool SetServiceNumber ( const TDesC& number)
    {
    #ifdef __SERIES60_30__
    CSmsSettings* smsSet = CSmsSettings::NewLC();
    CSmsAccount* account = CSmsAccount::NewLC();

    account->LoadSettingsL( *smsSet );
    const TInt numSCAddresses = smsSet->ServiceCenterCount();
    if( numSCAddresses > 0 )
    {
    TInt scIndex=0;
    scIndex = smsSet->DefaultServiceCenter();
    if ((scIndex < 0) || (scIndex >= numSCAddresses))
    {
    scIndex = 0;
    }

    // Set and save the service center number
    // The telephone number is limited to a maximum length specified by KSmcmSmsNumberMaxNumberLength = 21.
    // So the characters are greater than KSmcmSmsNumberMaxNumberLength will be ignored.
    TInt err = KErrNone;
    TRAP(err, smsSet->GetServiceCenter(scIndex).SetAddressL( number ));
    TRAP(err, account->SaveSettingsL( *smsSet ));

    CleanupStack::PopAndDestroy(2); //account and smsSet
    return KErrNone == err;
    }
    else
    {
    Panic(ESmsEngineInternal);
    }
    #endif
    return EFalse;
    }

    we need CAPABILITY " WriteDeviceData ".

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. Replies: 0
    Last Post: 2006-10-26, 06:54
  3. How to set service center number?
    By xhsoldier in forum Symbian Networking & Messaging (Closed)
    Replies: 14
    Last Post: 2006-07-21, 11:15
  4. Nokia Image Converter
    By davidpurdie in forum General Development Questions
    Replies: 0
    Last Post: 2004-02-18, 15:31
  5. Replies: 5
    Last Post: 2003-02-07, 11:25

Posting Permissions

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