You have to be more specific. What do you mean by 'lost in term of the process of how to verify like the codes.' ? You can always make a network connection and communicate to a server using any means you please. You just need the right permission.
You should read this book : Application Security for the Android Platform - O'Reilly, good book for understanding the security, permissions and other safeguards problems. This could be useful to solve your problem.