New to Android, Will this loop upon startup?
<p>I'm new to android dev and I was wondering if, upon startup, will the following code start looping, check the result of connect, vibrate if 1, and then sleep for 5 minutes?</p>

<pre><code>/** Called when the activity is first created. */
boolean flag = true;

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);


    while(flag) {
        Handler handler = new Handler(); 
        handler.postDelayed(new Runnable() { 
            public void run() { 
                String foundblock = connect("blahblahblah"); //will return either 0 or 1
                if (foundblock == "1") {
                    Vibrator v = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
                    long milliseconds = 10;
                    v.vibrate(milliseconds);
                    flag = false;
                }
            } 
        }, 300000); 
    }
</code></pre>
