Reputation: 6089
Is there any dependency between Application's and Activity's/Fragment's lifecycle? Is it possible to get Activity.onCreate()
or Fragment.onAttached()
before Application.onCreate()
?
Upvotes: 0
Views: 445
Reputation: 1658
No, it is not possible. Refer the mention in documentation below for onCreate method of Application class.
Called when the application is starting, before any activity, service, or receiver objects (excluding content providers) have been created
Upvotes: 0
Reputation: 1007399
Is there any dependency between Application's and Activity's/Fragment's lifecycle?
The Application
singleton for your process will be created before any activities, let alone fragments.
Is it possible to get Activity.onCreate() or Fragment.onAttached() before Application.onCreate()?
Not in any conventional scenario.
Upvotes: 1