Discussion Board

Results 1 to 2 of 2

Hybrid View

  1. #1
    Registered User airwatch's Avatar
    Join Date
    Feb 2011
    Posts
    37
    I want to get my own SIM number using code.
    I have tried the below code but without success, any input is appreciated.

    RTelServer telServer;
    telServer.Connect();

    TInt n;
    telServer.EnumeratePhones(n); // n is 1;

    qDebug() <<"Enumerate phones"<<n;
    TFileName tsyName;
    telServer.GetTsyName(0, tsyName);

    TBool isSupported = EFalse;
    telServer.IsSupportedByModule(tsyName, KETelFuncMobileOwnNumberStore, isSupported); // is-supported is True

    RTelServer::TPhoneInfo info;
    telServer.GetPhoneInfo(0, info);

    RMobilePhone phone;
    int error = phone.Open(telServer, info.iName);
    qDebug()<<"RMobilePhone open"<< error;

    RMobileONStore ownNumberStore;
    error = ownNumberStore.Open(phone);
    RMobileONStore::TMobileONEntryV1 ownNumberEntry;
    ownNumberEntry.iIndex = 0;
    RMobileONStore::TMobileONEntryV1Pckg ownNumberEntryPckg(ownNumberEntry);

    AsyncWaiter* waiter1 = AsyncWaiter::NewL();
    ownNumberStore.Read(waiter1->iStatus,ownNumberEntryPckg);
    waiter1->StartAndWait();


    The result is an empty buf...?

    -thanks

  2. #2
    Nokia Developer Expert symbianyucca's Avatar
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    28,673
    that's because most SIM cards are not having the number stored in the SIM card.

Similar Threads

  1. how to get msisdn from headers using php
    By panosony in forum Mobile Web Site Development
    Replies: 0
    Last Post: 2008-01-24, 11:48
  2. Replies: 3
    Last Post: 2007-01-25, 21:09
  3. TLS, SSL, and MSISDN
    By kief in forum Mobile Web Site Development
    Replies: 1
    Last Post: 2004-08-03, 09:18
  4. How to get MSISDN?
    By insener in forum Mobile Web Site Development
    Replies: 1
    Last Post: 2003-12-23, 08:49
  5. get MSISDN
    By gchuaay in forum Mobile Web Site Development
    Replies: 2
    Last Post: 2002-10-16, 07:56

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved