×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    Regular Contributor
    Join Date
    Jul 2007
    Location
    Chennai, India
    Posts
    78

    Sending an application to background in symbian 9.1

    Hi all,
    I am developing an application in Symbian9.1. I want to run the application in background... I am using the below code for that..

    Header file : #include <apgtask.h>
    Library file : apgrfx.lib

    TApaTask task(iEikonEnv->WsSession( ));
    task.SetWgId(CEikonEnv::Static()->RootWin().Identifier());
    task.SendToBackground();

    but i am getting error in this..
    This is the error.....

    Undefined symbol: 'int RWindowGroup::Identifier(void) const (?Identifier@RWindowGroup@@QBEHXZ)'[]

    please help me...
    Thanks & Regards

    Kannan.

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,175

    Re: Sending an application to background in symbian 9.1

    when you add functions that are using some API's, you should always cehck SDK documentations for required headers & libraries and add them into your project.

    So just open the sdk help and seach for RWindowGroup, then add the library it requires to your project and re-build the project.

    yucca

  3. #3
    Super Contributor
    Join Date
    Jun 2006
    Location
    India
    Posts
    3,037

    Re: Sending an application to background in symbian 9.1

    Hi,

    you need to add
    W32STD.H
    ws32.lib

    for RWindowGroup, yucca is right you need to check the sdk to remove syntax error.
    Use [URL="http://qt.nokia.com/products/qt-quick/"]Qt-Quick[/URL] to make your application UI more attractive.

    [URL="http://store.ovi.com/content/271896"]http://store.ovi.com/content/271896[/URL] | [URL="http://store.ovi.com/content/276199"]http://store.ovi.com/content/276199[/URL] |[URL="http://store.ovi.com/content/276202"] http://store.ovi.com/content/276202[/URL] | [URL="http://store.ovi.com/content/280827"]http://store.ovi.com/content/280827[/URL]

  4. #4
    Regular Contributor
    Join Date
    Nov 2008
    Posts
    134

    Re: Sending an application to background in symbian 9.1

    Quote Originally Posted by kkrish View Post
    Hi,

    you need to add
    W32STD.H
    ws32.lib

    for RWindowGroup, yucca is right you need to check the sdk to remove syntax error.
    Hi,
    My application is such that when user clicks on the menu item at to start it the application should go into background. Basicaly an auto answer call. Once the user clicks on auto answer, the appllication shold answer all incoming calls itself. Following is the code i wrote but it is not working and the application stays in foregroind only. Can you suggest what might be the problem?


    void CAnswerSecondAppUi::HandleCommandL(TInt aCommand)
    {
    switch ( aCommand )
    {
    case EAknSoftkeyBack:
    {
    RWsSession aWsSession;
    aWsSession.Connect();
    TApaTask task(aWsSession);
    task.SetWgId( CEikonEnv::Static()->RootWin().Identifier());
    task.SendToBackground();
    aWsSession.Close();
    /*iEngine = CAudio::NewL();
    iEngine->PlayL(); */
    //iSound->SetVolume(iVolume);
    }
    break;
    case EEikCmdExit:
    {
    //iSound->SetVolume(iVolume);
    Exit();
    break;
    }
    case EAnswerSecondCmdAppTest:
    {
    //iEngine->Stop();


    iTelObserver->StartListening();

    break;
    }
    // TODO: Add Your command handling code here

    default:
    break;
    }
    }

  5. #5
    Regular Contributor
    Join Date
    Nov 2008
    Posts
    134

    Re: Sending an application to background in symbian 9.1

    It's working now.

  6. #6
    Regular Contributor
    Join Date
    Nov 2008
    Posts
    134

    Re: Sending an application to background in symbian 9.1

    Hi,

    I am able to send the application to background but now i have written the following piece of code to implement auto answering but it's not working in #rd edition FP2 though it used to work in 2nd edition FP1

    void CAnswerCallEngine::AnswerActiveCallL()
    {
    WriteToFileL(_L8("Function Answer Called\n"));
    RCall iCall;
    RLine::TLineInfo lineInfo;
    iLine.GetInfo(lineInfo);
    iCall.OpenExistingCall(iLine, lineInfo.iNameOfCallForAnswering);
    iCall.AnswerIncomingCall(iStatus);
    SetActive();
    }

    Can you suggest what could go wrong?

    Also, after this the application used to play a tone for the caller and then records the message. It was working well in S60 2nd ed. but now after porting to 3rd ed. it doesnt perform the desired functionallity.
    Can anyone throw some light on this?

    Thanx

  7. #7
    Regular Contributor
    Join Date
    Nov 2008
    Posts
    134

    Re: Sending an application to background in symbian 9.1

    And also one more thing i wanted to inquire. Will this RCall::AnswerIncomingCall also require to mention capabilities in the .mmp file like NetworkControl and NetworkServices in S60 3rd edition?
    And hence get it open signed from Symbian Online?

    Thanks

  8. #8
    Super Contributor
    Join Date
    Mar 2004
    Location
    Bangalore,India
    Posts
    2,146

    Re: Sending an application to background in symbian 9.1

    Yes both those capabilities are needed in the mmp file, using open signed you cant get networkcontrol though.
    Cheers,
    Mayank

  9. #9
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: Sending an application to background in symbian 9.1

    and that if why it is suggested to use CTelephony that required lower capability

  10. #10
    Regular Contributor
    Join Date
    Nov 2008
    Posts
    134

    Re: Sending an application to background in symbian 9.1

    Quote Originally Posted by mayankkedia View Post
    Yes both those capabilities are needed in the mmp file, using open signed you cant get networkcontrol though.
    Hi Thanxs for the reply.
    But i fail t understand how come the same code worked perfectly in S60 2nd ed FP2 and not after porting to 3rd ed FP1?
    Atleast it should answer the incoming call ignoring the other functionalities that had also been implemented.
    Doe my code in the below posts raise any eyebrows?

    Thanx

  11. #11
    Super Contributor
    Join Date
    Mar 2004
    Location
    Bangalore,India
    Posts
    2,146

    Re: Sending an application to background in symbian 9.1

    That is because 2nd Edition FP1 is a Symbian 7.0 based SDK, while the platform security implementation has come into effect from Symbian 9.x onwards, on which the S60 3rd Edition is based incidentally, and thats the reason why your code doesnt work on the 3rd Edition, as it would be raising a capability/plat sec error.

    You would do well to change your code to use CTelephony as sunil pointed out. However is there any specific reason why would you continue to use the RCall/RLine etc? If yes then you would need those capabilities from a dev cert issued by a competent authority.
    Cheers,
    Mayank

  12. #12
    Super Contributor
    Join Date
    Jun 2006
    Location
    India
    Posts
    3,037

    Re: Sending an application to background in symbian 9.1

    Hi,

    There are lots of diferences in-between 2nd and 3rd SDk. That code will also work fine if you have the desire capability and sign your application with these capability.

    SO instead of RCall use CTelephony in 3rd sdk because it requried NetworkServices capability. For more details you can check with SDK.
    Use [URL="http://qt.nokia.com/products/qt-quick/"]Qt-Quick[/URL] to make your application UI more attractive.

    [URL="http://store.ovi.com/content/271896"]http://store.ovi.com/content/271896[/URL] | [URL="http://store.ovi.com/content/276199"]http://store.ovi.com/content/276199[/URL] |[URL="http://store.ovi.com/content/276202"] http://store.ovi.com/content/276202[/URL] | [URL="http://store.ovi.com/content/280827"]http://store.ovi.com/content/280827[/URL]

  13. #13
    Regular Contributor
    Join Date
    Nov 2008
    Posts
    134

    Re: Sending an application to background in symbian 9.1

    Quote Originally Posted by kkrish View Post
    Hi,

    There are lots of diferences in-between 2nd and 3rd SDk. That code will also work fine if you have the desire capability and sign your application with these capability.

    SO instead of RCall use CTelephony in 3rd sdk because it requried NetworkServices capability. For more details you can check with SDK.
    Thanks for the replies.

    Acyually I have ported the application from 2nd ed FP2 to 3rd ed FP1. Modifying the code with CTelephony will need some rework and I was thinking if I could get this working itself.
    I had included the following capabilities for the 3rd ed project:
    ReadUserData,NetworkServices,WriteDeviceData and LocalServices and got it Open signed and then tried to install on my N73 phone
    The app installs but does not auto answer call only what to talk to recording functionality.

    However, I will try with CTelephony as well. Can you give me pointers how to implement this very class? How should i use it in my relevant context of auto answering call?
    Also which API soupports CTelephony?

    Thanks

  14. #14
    Super Contributor
    Join Date
    Mar 2004
    Location
    Bangalore,India
    Posts
    2,146

    Re: Sending an application to background in symbian 9.1

    Check the wiki link

    http://wiki.forum.nokia.com/index.ph...ny_3rd_Edition

    If you want to auto answer, you can have the notifier notify you of an incoming call and then you can call the answerincomingcall api to answer the call, most of the details are there on the wiki page
    Cheers,
    Mayank

  15. #15
    Regular Contributor
    Join Date
    Nov 2008
    Posts
    134

    Re: Sending an application to background in symbian 9.1

    Quote Originally Posted by mayankkedia View Post
    Check the wiki link

    http://wiki.forum.nokia.com/index.ph...ny_3rd_Edition

    If you want to auto answer, you can have the notifier notify you of an incoming call and then you can call the answerincomingcall api to answer the call, most of the details are there on the wiki page
    Hi Thanks for the info. I had gone through the same and will be working on it.

    btw i was using the following code to notify me :

    Code:
    if(!IsActive())
    {
    	iLine.NotifyStatusChange(iStatus, iCallStatus);     
            SetActive();
    }
    and the following to handle the event of answering the call:

    Code:
    switch (iCallStatus) 
                {
                case RCall::EStatusRinging:
                    {
                    RWsSession sess=CCoeEnv::Static()->WsSession();
    		TWsEvent event;
    		TInt id=sess.FindWindowGroupIdentifier( 0, _L("*Phone?"));
    		event.SetType(EEventKey);
    		event.SetTimeNow();
    		event.Key()->iCode = EKeyDevice1;
    		event.Key()->iModifiers = 0;
    		event.Key()->iRepeats = 0;
    		event.Key()->iScanCode = EStdKeyNull;
    		sess.SendEventToWindowGroup( id, event );
    		WriteToFileL(_L8("EStatusRinging\n"));
               	iAnswer->AnswerActiveCallL();
                 	break;
           }
    Code:
     void CAnswerCallEngine::AnswerActiveCallL()
        {
            WriteToFileL(_L8("Function Answer Called\n"));
            RCall iCall; 
    	RLine::TLineInfo lineInfo; 
    	iLine.GetInfo(lineInfo); 
    	iCall.OpenExistingCall(iLine, lineInfo.iNameOfCallForAnswering);
    	iCall.AnswerIncomingCall(iStatus);
    	SetActive(); 
        }
    But still it doesnt seem to work. Anything that i might be missing in this?

    Thanx

Similar Threads

  1. Symbian OS 9.1 and RTP
    By sajidul in forum Symbian
    Replies: 8
    Last Post: 2007-12-20, 15:55
  2. symbian signed testing problem.
    By anglina in forum Symbian
    Replies: 0
    Last Post: 2007-02-01, 10:15
  3. Symbian OS 9.1 and RTP
    By sajidul in forum Symbian Tools & SDKs
    Replies: 0
    Last Post: 2007-01-08, 06:34
  4. Replies: 2
    Last Post: 2004-05-08, 09:09

Posting Permissions

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