- Home /
Problem with closing an android app
Hi. In my 2d game for android I show an exit dialog when the user presses the KeyCode.Escape to ask for a quit confirm. Since I installed the admob plugin, my app immediately quit after the the user presses that Key. I think that the reason is that this plugin has a Manifest file that integrates the original one and this could have changed the way my app close.
Is this true? How can I fix this?
Thank you in advance!
It has nothing to do with the manifest but with the code that comes with the plugin. AFAI$$anonymous$$ admob unity plugin does not implement application.quit in the code (but for instance chartboost does). Easy way to fix it is to look in to code (Find in files in $$anonymous$$ono or ctrl+shift+F in VS) for "$$anonymous$$eyCode.Escape" or "Application.Quit" and see where it is called. Also what happens when you actually display add on the device and than click back button? Is it closing the app also ?
Thank you for the answer. It was a really stupid mistake by me. Adding the code to instantiate the ads i accidentally deleted one line of my previous code, now it works fine.
Your answer
![](https://koobas.hobune.stream/wayback/20220613193533im_/https://answers.unity.com/themes/thub/images/avi.jpg)