How can I close WebView in my Application?
<p>I have task - I need to create application which to give for user a WebView, and close after 2 minutes. I have made this code:</p>

<pre><code>package com.nda.main;

import java.util.Timer;
import java.util.TimerTask;

import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.os.SystemClock;
import android.util.Log;
import android.webkit.WebView;
import android.webkit.WebViewClient;

public class MainActivity extends Activity{

    WebView view;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.research);

        view=(WebView)findViewById(R.id.webViewResearch);
        view.loadUrl("http://www.google.com");

        Timer timer=new Timer();
        timer.schedule(new TimerTask(){

            @Override
            public void run() {
                // TODO Auto-generated method stub
                MainActivity.this.finish();
            }


        }, 120000);
}
}
</code></pre>

<p>But I have 2 problems:</p>

<p>1) Activity won't close, but Event of timer will be. If I don't use view.loadUrl() then Activity will close. 
2) How can I give user field for url inputing? I can insert EditText in application, but may be exist easier mean?</p>

<p>Thank you. </p>
