I am new to Android and this is my first question here so please go easy on me.
Is it possible to check some condition inside onCreate() of an Activity and display an Al
Showing an alert dialog in onCreate causes android.view.WindowLeaked exception, because the activity isn't yet created.
The solution I found is to put the code that shows the dialog in onStart() method:
@Override protected void onStart() { super.onStart(); // show dialog here }