App freezes when returning from sleep

I made a crossplatform game (iOS/UWP/Android) with CocosSharp and Box2D, and on Android when the app returns from sleeping if freezes, this only happens on Android. But when I press the "Overview" button (the third button on Android devices, when you see all open apps) and I select it, the app returns to normal behavior.

You can see the behavior by downloading the app on the Play Store, search for "Kuklos Shooter".

I've tried several things but nothing works, I implemented OnStart, OnResume, OnRestart and OnPause in MainActivity.cs and they are being called in the same order when returning from sleep and when I select the app in the Overview screen so it's not that. Any ideas?


  • LaetitiaLaetitia Member ✭✭
    edited September 2018

    Hello, Yes, it's a bug, it happens when you use CocosSharp+Xamarin.Forms :(
    You could fix it in the cocosSharp source, I am going to do it myself

  • MarkedOneMarkedOne ARMember ✭✭

    I'm not using Xamarin.Forms just Xamarin. I guess it happens also with Xamarin. Do you know where is the error exactly so I can fix it too? And if you fixed it please share the code!

  • LaetitiaLaetitia Member ✭✭

    Alright, I will do it and then I'll post the code here. See you later

  • MarkedOneMarkedOne ARMember ✭✭

    Hi Laetitia, any progress? Maybe I can help

Sign In or Register to comment.