I need help with Android and Java
<p>I am struggling to figure out how to handle a situation in Android where code continues to execute when I really don't want it to. In the onCreate() of an activity I have some stuff that I need to do in order and I can't have the code continue to execute until certain things happen first. I understand that this is how Android and Java behave and I am struggling to figure out another way to accomplish what I need. </p>

<p>ShowEula is a class that I created to show a simple dialog with my EULA. I really need to wait until the user agrees or disagrees with the EULA before calling DBGetOnlineVersionNumber(). Maybe I'm just not going this the correct way. Anyway here's a snippet of my code:</p>

<pre><code>public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);        
    setContentView(R.layout.main);
    String version;
    ShowEula();     
    version = DBGetOnlineVersionNumber();
    ....
</code></pre>
