How to display different content depending on whether the app is opened first time or the user setup something?

Imagine a activity A, B, If the user open the app first time or haven't setup something in activity B, Then display activity B, otherwise display activity A.

How to overcome this? Thank you.