You need to rethink things in terms of the event driven model used by android.
You cannot wait for user interface events in onCreate because no user interface events can be delivered until the onCreate command returns.
Perhaps you could organize things like a software state machine.
onCreate will show EULA and set state to EULA_SHOWING
accept will push state to EULA_ACCEPTED and display something like this
Of course, you probably do not want to show EULA every time you start, but only after installation, but you can handle it with something stored in the settings.
source
share