how to write mobile application