package gr.mybook.myintentweb;

import java.net.URL;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
import android.webkit.WebView;

public class Activity_2 extends Activity {
	
	private static final String TAG = "Activity_2";
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main_2);
        
        Intent intent = getIntent();
        Uri data = intent.getData();
        URL url = null;
        try {
        	url = new URL(data.getScheme(), data.getHost(), data.getPath());
        }
        catch (Exception e) {
        	Log.d(TAG, "...ERROR...");
        }
        WebView webView = (WebView) findViewById(R.id.webView1);
        webView.loadUrl(url.toString());
    }
}