• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps doubt about activity states

when a activity in android application is created onCreate method is called
then onStart and then onResume...
Then after onResume activity is running
I want do some process continuously while activity is running lets say I want to increase counter variable by 1..
I am not clicking any button not doing anything but application is running..
Then under which method do I write the code ?
 
what condition must be met for the variable to be incremented? A certain lapse in time? Regardless, you will need to spawn off a background thread and perform the work asynchronously.
 
Back
Top Bottom