How to handle phone call interrupts

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Hey guys

    I've been searching the forum but I can't seem to find anyone that's asked this question before. In my app, I want to be able to handle cases when the game gets interrupted by a phone call.

    I know I can uncheck the "End application when not in foreground" option but on top of that I'd like the game to pause itself when it's not in the foreground. I've already implemented a pausing system but I don't know what is the condition that checks when the application is not in the foreground.

    Can you please help?

  • The thing is, I need to know the name of the event that checks for when the application is in the foreground, so that I can then tell the app to pause itself. The reason I need to do this is because when I pause the game I also display a text saying the game is paused, and the player can unpause when he wants after he comes back in the game(by tapping anywhere on the screen).

    I'll check the read phone status permission but can you please tell me what is the name of the event I'm looking for?

  • How do you detect return (or more importantly the leave, if something could trigger before going to background) with fusion developer?
    I imagine you could do a trick with the time and date object to detect return, but that should also be possible with the non-developer version.

    Please login to see this link. =)

  • Please login to see this link.


    actually this is handle by the extension or object that specific require that, because when you go background, after device receive the pause there i no much time before going pause

    Please login to see this link.

    try this, don´t forget to use read phone state permission, let me know if trigger


    Please login to see this attachment.

    Regards,


    Fernando Vivolo

    ... new things are coming ...

  • I tried the above after checking the READ_PHONE_STATE permission but the counter does not get incremented after I receive a phone call (neither if I answer or reject the phone call). For reference I do have the developer version installed.

    Does the above code work for any of you guys? Can someone please give me an example of a simple mfa where a counter gets incremented upon a phonecall?

    The way I see it, the software already has the ability to detect when the app is not in the foreground even without the phone status permission, since there's a checkbox in fusion 2.5 that ends the application when you receive a phonecall . I've tested it. With the checkbox removed the application does not end upon a phonecall. It keeps going.

    If there isn't a way to detect the phone calls directly, then I at least want to know how I check to see if the app is in the foreground or not . Clickteam fusion can do it, and without any special permissions. The question is if there's been an option implemented so that I can do it too.

  • Ok, so I tried all of the options on the window object. (window is minimized, window has focus, application is active)

    They all work fine on the computer but they don't work at all on the mobile phone, when i get a call or when the phone goes to standby mode. I'm using a Samsung S3 to test.

    I refuse to believe I have the option to see if the phone is being charged but I can't see if the application has focus or not . There has to be something I'm missing.

    Any ideas guys? Can someone at least provide me a short example that works for them where they can increment a variable when the android app loses focus? Handling call interrupts is an important part of developping any phone app. I can't just let it slide.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!