Android resume after lock screen

Hello all when I try to resume my application after home button press everything is working fine.
But when I try to do a resume when user pressed the power button and used a lock screen my game just restarts any idea how to handle that ?

You will probably need to record the ADB logs when this happens so we can figure out why.

Could be this [SOLVED] OnResume Crashes but only in signed/aligned version

@daveleaver Well when I pause the application with the home button and resume it all it’s fine but when in application and the user press the home button and screen is unlocked the application start to load all over again.

The post over there is not helping me and it’s hard to debug because Xamarin.Android is broken and when I try to debug my whole application is freezing.

Also you can reproduce the issue when you just draw the a image inside a empty monogame project lock the phone and unlock and you will see that the application is loading from the beggining.