×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Regular Contributor
    Join Date
    Mar 2003
    Location
    Hyderabad, India
    Posts
    90

    Incomming call event

    How can I trap incomming call event?

    I am developing a game. I want the game to pause when a call comes in. Inorder to do that I need to have some event telling me that there is an incomming call, then I can pause my game.

    Could you please help me out with this?

  2. #2
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    132
    Hi,

    It is possible to listen for incoming calls, but it's not very practical to do so in a game. It would be more useful to e.g. react to keyboard focus changes. This way, a game could pause itself when any system notification occurs (incoming calls, batt.low, menu is displayed, etc...) or the game is switched to background.

    If you are using the CDirectScreenAccess API in your game, you can use it to detect and react to such events easily. See the documentation and example from Symbian:

    How to implement Direct Screen Access with a Series 60 App
    http://www.symbian.com/developer/tec...ultimedia.html

    And the example + doc from Forum Nokia website:

    Direct Screen Access Example Application for Series 60 Platform
    http://www.forum.nokia.com/series60 -> Downloads

    Br,
    FN Developer Support

  3. #3
    Regular Contributor
    Join Date
    Mar 2003
    Location
    Hyderabad, India
    Posts
    90
    Thanks for the reply.

    In my code I have handled change of focus event using HandleForegroundEventL(). It works fine for my purpose. Messages like low battery, charging pushes the game into background and it pause. But when a call comes in and the message is displayed then this event is not called, and the game doesn't pauses.

    What should I do to accomplish it?

  4. #4
    Registered User
    Join Date
    Jun 2003
    Posts
    22
    I have a related problem. For some time when some user activity is going on I want to disable the incomming call button and disallow to take incomming calls. Is this possible?

    ani

  5. #5
    Registered User
    Join Date
    Mar 2003
    Posts
    8

    CDirectScreenAccess screws up after a dialog is displayed

    I have a similar problem.

    I am using CDirectScreenAccess in my game, and it works fine when the task-switch button is pressed. However, when I get an incoming call dialog or a battery-low / charging dialog, the screen screws up totally.

    Although the DSA::AbortNow() function gets called, and I am able to call DSA::Cancel() - it still results in a corrupted screen, and when I call DSA::StartL() again the screen remains messed up : the area where the dialog box was is fine, but the top-half of the screen becomes all flickery.

    Perhaps DSA is not calculating the correct clipping region after the application has regained focus ? (It is supposed to do this within the StartL() code). Note that every frame I get the DSA Gc, and the drawable region, and set the clipping region.

    Anyone have any idea about this - I have tried practically evey combination in an attempt to fix this problem, it is now the one thing which is preventing me from shipping my project as it will never get Symbian Signed with this bug...

    CW

  6. #6
    Registered User
    Join Date
    Mar 2003
    Posts
    8
    another weird thing :

    When my app gets switched to the background AbortNow() gets called as it should. However Restart() then gets called immediately after - even though my app is not visible.

    I am using the app framework, and have based my code on the DSA samples. I notice this happens in the sample code too - it this a bug?

    CW

Posting Permissions

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