Forum Libraries, Components, and Plugins
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

How to close CocosSharp game android?


i am able to get back button event but not able to close the app from here

if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)
//close the app

is there any method to close the current game?
Is there any way to get android activity object in gamelayer so i can finish or distroy or do something else?


Best Answer


  • Parth2651Parth2651 USMember

    That's exactly what i was looking for. thanks @RamiTabbara

  • CoccoBeginnerCoccoBeginner USMember

    I already asked question about triggering back button press event and it is more than 24 hours. Still waiting for approval of that thread.

    Anyways, I am asking my question here. How to trigger back button press to close the application or any alternate way to exit the application?

Sign In or Register to comment.