I have tried this code and worked perfectly when i run it as a java application......then i created an android project and did through a button what is done through main. on clicking a button i...