package beyondsoft.bewomitarbeiterapp;

import android.app.Activity;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.Menu;
import android.view.MenuItem;
import android.webkit.WebView;
import android.webkit.WebViewClient;

/**
 * Created by bib on 02.05.2016.
 */
public class WebdokuActiviti extends ActionBarActivity {


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.webdoku);

        // Uri uri = Uri.parse("http://www.google.com");
        // Intent intent = new Intent(Intent.ACTION_VIEW, uri);
        // startActivity(intent);


        String URL = "http://192.168.1.115/BewoPlanerMobil/login/demo";
        WebView view = (WebView) this.findViewById(R.id.webView1);

        view.getSettings().setJavaScriptEnabled(true);
        view.loadUrl(URL);
        view.setWebViewClient(new WebViewClient());




        /*
        view.setWebViewClient(new WebViewClient(){

            public void onPageFinished(WebView view,String url){
                String username = "franz";
                String passwort = "walter";

                view.loadUrl("javascript:document.getElementbyId('tb_login').value='"+username+"; " +
                             "document.getElementsbyName('tb_password').value='"+passwort+";");





        });*/


    }


}
