AppiDevo
AppiDevo

Reputation: 3225

activities/fragments' lifecycle methods called in the main thread?

Are all activities/framgents' lifecycle methods called in the main thread by default? I'm implementing a class which checkes if the app is currently in foreground/background. I'm using activities' onPasue/onResume to do that. I would like to make sure that I don't have to synchronize methods of my class.

Upvotes: 1

Views: 166

Answers (1)

Gabe Sechan
Gabe Sechan

Reputation: 93614

Yes, they are. In general, if something is called off the main thread the documentation will state so.

Upvotes: 2

Related Questions