How To Communicate Between Fragments and Activities in Android

When is onAttach called during the Fragment LifeCycle?

When is onAttach called during the Fragment LifeCycle?