This is the application code which we have used for android.