I have this code, and working only If I use it on a webpage. If I compile the apk on android nothing happens
Create a button sprite and then you need to use the "Touch" instead of "Mouse" object type for Android. Mouse objects don't work on mobile devices, only PC.
However "Touch" object can work on both mobile devices and PC, so just use that if you want to work with both platforms.