×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    Oct 2010
    Posts
    94

    Sending emails and making calls in mobile application

    Hi ,
    can anyone tell how to make calls and send emails by qt code ??? I need resources please...

    Thanks..

  2. #2
    Registered User
    Join Date
    Jul 2004
    Posts
    166

    Re: Sending emails and making calls in mobile application

    http://kunalmaemo.blogspot.com/

  3. #3
    Regular Contributor
    Join Date
    Aug 2008
    Posts
    95

    Re: Sending emails and making calls in mobile application

    Link against: LIBS += -letel3rdparty

    Follow the code to make a call in Qt (require symbian c++):


    #ifndef S60MAKECALL_H
    #define S60MAKECALL_H

    #include <QString>

    #ifdef Q_WS_S60
    #include <Etel3rdParty.h>
    // link to etel3rdparty.lib
    #endif

    #ifdef Q_WS_S60
    class CCallDialer : public CActive
    {
    public:
    static CCallDialer* NewL( const TDesC& aNumber);
    static CCallDialer* NewLC( const TDesC& aNumber);
    ~CCallDialer();

    protected:
    CCallDialer();
    void ConstructL(const TDesC& aNumber);

    private:
    void RunL();
    void DoCancel();

    private:
    CTelephony* iTelephony;
    CTelephony::TCallId iCallId;
    CTelephony::TCallParamsV1 iCallParams;
    CTelephony::TCallParamsV1Pckg iCallParamsPckg;
    };
    #endif

    class S60MakeCall
    {
    public:
    S60MakeCall();
    ~S60MakeCall();
    void MakeCall(QString numeroTelefono);

    #ifdef Q_WS_S60
    CCallDialer *callDialer;
    #endif
    };




    #endif // S60MAKECALL_H






    #include "S60/s60makecall.h"



    S60MakeCall::S60MakeCall()
    {
    #ifdef Q_WS_S60
    this->callDialer = NULL
    #endif
    ;
    }

    S60MakeCall::~S60MakeCall()
    {
    #ifdef Q_WS_S60
    if (this->callDialer) delete this->callDialer;
    this->callDialer = NULL;
    #endif

    }

    void S60MakeCall::MakeCall(QString numeroTelefono)
    {
    #ifdef Q_WS_S60
    TBuf<48> dNumeroTelefono(numeroTelefono.utf16());

    this->callDialer = CCallDialer::NewL(dNumeroTelefono);
    #endif
    }


    #ifdef Q_WS_S60
    CCallDialer* CCallDialer::NewL(const TDesC& aNumber)
    {
    CCallDialer* self = CCallDialer::NewLC(aNumber);
    CleanupStack::Pop(self);
    return self;
    }

    CCallDialer* CCallDialer::NewLC(const TDesC& aNumber)
    {
    CCallDialer* self = new (ELeave) CCallDialer();
    CleanupStack::PushL(self);
    self->ConstructL(aNumber);
    return self;
    }


    CCallDialer::~CCallDialer()
    {
    Cancel();
    delete iTelephony;
    }

    void CCallDialer::ConstructL(const TDesC& aNumber)
    {
    iTelephony = CTelephony::NewL();
    CTelephony::TTelNumber telNumber(aNumber);

    iCallParams.iIdRestrict = CTelephony::ESendMyId;

    iTelephony->DialNewCall(iStatus, iCallParamsPckg, telNumber, iCallId);
    SetActive();
    }

    CCallDialer::CCallDialer()
    : CActive(EPriorityNormal), iCallParamsPckg(iCallParams)
    {
    CActiveScheduler::Add(this);
    }

    void CCallDialer::RunL()
    {
    //iObserver.CallDialedL(iStatus.Int());
    }

    void CCallDialer:oCancel()
    {
    iTelephony->CancelAsync(CTelephony::EDialNewCallCancel);
    }
    #endif

  4. #4
    Registered User
    Join Date
    Oct 2010
    Posts
    94

    Re: Sending emails and making calls in mobile application

    Thanks alot I'll check this out thanks again...

  5. #5
    Registered User
    Join Date
    Oct 2010
    Posts
    94

    Re: Sending emails and making calls in mobile application

    Hi negus,
    I tried this code and in my mainwindow.cpp I created an object like this:

    call=new S60MakeCall();
    call->MakeCall("ANY NUMBER");

    the application ran without errors but it didnt make any call !!! Knowing that I run on N8 (symbian 3) device.....help please
    Last edited by Maysoon88; 2011-01-02 at 09:00.

  6. #6
    Regular Contributor
    Join Date
    Dec 2010
    Posts
    142

    Re: Sending emails and making calls in mobile application

    Did you add NetworkServices capablity to your project. like in your pro file

    symbian: {
    TARGET.CAPABILITY = "NetworkServices"
    }

  7. #7
    Registered User
    Join Date
    Oct 2010
    Posts
    94

    Re: Sending emails and making calls in mobile application

    Quote Originally Posted by dahiya.vinod View Post
    Did you add NetworkServices capablity to your project. like in your pro file

    symbian: {
    TARGET.CAPABILITY = "NetworkServices"
    }
    Yes I did it after you told me and it still not working !!! should I add something else to my PRO file???

  8. #8
    Registered User
    Join Date
    Oct 2010
    Posts
    94

    Re: Sending emails and making calls in mobile application

    hi thank u all its working now, it just needed me to maintain my Qt version there where some missing libraries I guess.

    but I still need something for sending emails

  9. #9
    Registered User
    Join Date
    Jul 2007
    Posts
    279

    Re: Sending emails and making calls in mobile application

    thanks negus so much
    it is working fine, but i want to send a USSD also but i can't
    the ussd is something like "*505*number# " please tell me if there is a way to do that
    thanks
    Ram

Similar Threads

  1. Problem in sending emails
    By S_Mohanty in forum Symbian Networking & Messaging (Closed)
    Replies: 6
    Last Post: 2010-08-30, 16:27
  2. making s bluetooth application compatible with all mobile phones?
    By praveens96 in forum Bluetooth Technology
    Replies: 2
    Last Post: 2010-07-23, 16:55
  3. Making A mobile Banking Application
    By nicenouman in forum Mobile Java General
    Replies: 22
    Last Post: 2008-03-05, 11:07
  4. 9300 is not sending emails on domains other then my own
    By ninaind in forum General Development Questions
    Replies: 2
    Last Post: 2005-02-26, 23:44
  5. Sending Emails
    By rriveroll in forum General Messaging
    Replies: 1
    Last Post: 2002-08-08, 11:17

Posting Permissions

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