×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    Registered User
    Join Date
    Dec 2010
    Posts
    31

    Make a phone call using symbian code from QT

    Hello,

    I dont know if i post this where it should be, sorry for that, I am trying to make a phone call from my QT application, QTMobility does not support making a call and so i learned that i need to use Symbian native code.
    I checked this link using Ctelefony http://wiki.forum.nokia.com/index.ph...ith_CTelephony, but this got me more puzzled, as it seems very complicated, if someone has some suggestions on how i can do this please let me know.

    Thanks,
    ZeroSum

  2. #2
    Regular Contributor
    Join Date
    Nov 2006
    Posts
    128

    Re: Make a phone call using symbian code from QT

    I think CTelephony API is the best and easy way to do this. You need to explore more about this.
    You can ask for any confusion here if you puzzled.

  3. #3
    Registered User
    Join Date
    Dec 2010
    Posts
    31

    Re: Make a phone call using symbian code from QT

    Thank you for answering :

    First i will put this entire code unde #if OS_Symbian #endif brakets
    so after reading the example i see this kind of call

    "To instantiate the CCallDialer, from the observing class, use something like this:

    iCallDialer = CCallDialer::NewL(*this, phoneNumber1); "

    now this takes a *this parameter and looking at the .h i see this:
    CCallDialer* CCallDialer::NewL(MDialObserver& aCallBack, const TDesC& aNumber)

    meaning that this parameter is of MDialObserver type, my cmain class is a QMainWindow, i found nothing about MDialObserver, also the little thing i found about TDesC is that it is some kind of string, I hope that calling this with the param "075723212"-(meanign some random phone number) should work,

  4. #4
    Registered User
    Join Date
    Feb 2007
    Location
    India
    Posts
    1,128

    Re: Make a phone call using symbian code from QT

    Quote Originally Posted by Zerosum3 View Post
    Thank you for answering :

    First i will put this entire code unde #if OS_Symbian #endif brakets
    so after reading the example i see this kind of call

    "To instantiate the CCallDialer, from the observing class, use something like this:

    iCallDialer = CCallDialer::NewL(*this, phoneNumber1); "

    now this takes a *this parameter and looking at the .h i see this:
    CCallDialer* CCallDialer::NewL(MDialObserver& aCallBack, const TDesC& aNumber)

    meaning that this parameter is of MDialObserver type, my cmain class is a QMainWindow, i found nothing about MDialObserver, also the little thing i found about TDesC is that it is some kind of string, I hope that calling this with the param "075723212"-(meanign some random phone number) should work,
    Hi ........You can use below mentioned piece of code

    XQTelephony *telephony = new XQTelephony(this);
    telephony->call("+1234444555555");

  5. #5
    Registered User
    Join Date
    Dec 2010
    Posts
    31

    Re: Make a phone call using symbian code from QT

    Hello,

    I think XQTelephony is deprecated as QMobileExtensions has been replaced by QMobility and XQTelephony is no longer in QMobility

  6. #6
    Registered User
    Join Date
    Dec 2010
    Posts
    31

    Re: Make a phone call using symbian code from QT

    Update so i managed to get a working code for CTelephony imported the etel3rdparty.h library in my .pro file, i type CTelephony *c, and when i write in the ide c-> i get the small box with all the methods, i select newL(), but when i compile this the a symbian device i gett the message "c does not have a method newL()", i dont understand why :-s.

    this is my symbian part of the QT project file:

    symbian {
    include($$PWD/../../symbianpkgrules.pri)
    TARGET.UID3 = 0xe527b0f9

    TARGET.CAPABILITY += Location \
    NetworkServices \
    ReadUserData \
    LocalServices \
    ReadUserData \
    WriteUserData \
    UserEnvironment

    TARGET.EPOCSTACKSIZE = 0x14000
    TARGET.EPOCHEAPSIZE = 0x020000 0x800000

    LIBS += -lsendas2 \
    -lmsgs \
    -letext \
    -lefsrv \
    -lcharconv \
    -lgsmu\
    -etel3rdparty.lib\
    -e32base.lib\
    -euser.lib

    }

  7. #7
    Registered User
    Join Date
    Feb 2007
    Location
    India
    Posts
    1,128

    Re: Make a phone call using symbian code from QT

    You will need to call.... c = CTelephony::NewL(); in such a way......

  8. #8
    Registered User
    Join Date
    Dec 2010
    Posts
    31

    Re: Make a phone call using symbian code from QT

    thanks for answering,still no go, i get the dreaded undefined reference again, most likely it is a library linking problem, but i dont know what i did wrong, since i am still new to QT

  9. #9
    Registered User
    Join Date
    Feb 2007
    Location
    India
    Posts
    1,128

    Re: Make a phone call using symbian code from QT

    Can you make sure once?

    You have written......like this
    #ifdef Q_OS_SYMBIAN
    #include <etel3rdparty.h>
    #endif



    #ifdef Q_OS_SYMBIAN // Symbian specific compilation
    CTelephony *c = CTelephony::NewL();

    #endif
    ...........................
    ......................

  10. #10
    Registered User
    Join Date
    Dec 2010
    Posts
    31

    Re: Make a phone call using symbian code from QT

    #ifdef Q_OS_SYMBIAN

    #include <etel3rdparty.h>

    #endif

    #ifdef Q_OS_SYMBIAN

    dialer=new CClientApp(CTelephony::NewL());
    #endif

    this is pasted from my code,also i am looking into the header file of the lib when i reach to the newL() specification i see something like this :IMPORT_C static CTelephony* NewL();
    where as i can call a random constant CTelephony::EFaxLineStatusChange, and it compiles okay, the constant doesnt have the IMPORT_C statement in the lib header

  11. #11
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,751

    Re: Make a phone call using symbian code from QT

    Constants, enumerations, and the like are numbers with names, created for you (a human being). They are defined in the header files, and that is enough. What further definition would you want to import for a line "const TInt KNumberOne=1;"?

  12. #12
    Registered User
    Join Date
    Dec 2010
    Posts
    31

    Re: Make a phone call using symbian code from QT

    Okay but still why i get reference error for the NewL() method and not for any constant that is declared in the header without the IMPORT_C clause? I need to import something more to make the NewL() method work?

  13. #13
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,751

    Re: Make a phone call using symbian code from QT

    Having etel3rdparty.lib should be enough, and it already appears in #6. Is it an 'Undefined symbol' error, or how does it look like?

  14. #14
    Registered User
    Join Date
    Dec 2010
    Posts
    31

    Re: Make a phone call using symbian code from QT

    Thank you for the interest shown, this is the pasted compiler error :

    /NokiaQtSDK/QtCreator/Projects/Horoscope/horoscope.cpp:49: error: undefined reference to `CTelephony::NewL()'

  15. #15
    Registered User
    Join Date
    Dec 2010
    Posts
    31

    Re: Make a phone call using symbian code from QT

    SOLVED

    Seems i fixed the problem noticed that the compiler makes and .MMP file, opened it no sign of the etel3rdparty.lib, so i added it manually it compiled fine, googled around a bit to see how to make the compiler add the library in the MMP and wrote in my .pro file, in between the Symbian brackets this:

    MMP_RULES += "LIBRARY etel3rdparty.lib"

    Thank you all for the assistance,
    Cheers,
    Zerosum

Similar Threads

  1. Qt Creator code completion not working with Qt Mobility for Symbian
    By ceefour in forum [Archived] Qt Mobility Project
    Replies: 4
    Last Post: 2011-09-10, 05:02
  2. QT Dev environment for QT + Symbian C++ hybrid code development
    By imrajhegde in forum [Archived] Qt SDKs and Tools
    Replies: 1
    Last Post: 2010-11-20, 01:38
  3. Replies: 4
    Last Post: 2007-06-14, 05: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
  •  
×