title: Android app blank screen after Facebook login on WebView
body: <p>First of all I would like to say that I'm total noob when it comes to Android and Java development but I have managed to run the following code and it lauches my website. Sweet. </p>
  
  <p>Here is the code: </p>
  
  <pre><code>package se.madesolutions.cmok;
  
  import android.net.Uri;
  import android.os.Bundle;
  import android.support.design.widget.FloatingActionButton;
  import android.support.design.widget.Snackbar;
  import android.support.v7.app.AppCompatActivity;
  import android.support.v7.widget.Toolbar;
  import android.view.View;
  import android.view.Menu;
  import android.view.MenuItem;
  import android.webkit.WebSettings;
  import android.webkit.WebView;
  import android.webkit.WebViewClient;
  
  import com.google.android.gms.appindexing.Action;
  import com.google.android.gms.appindexing.AppIndex;
  import com.google.android.gms.common.api.GoogleApiClient;
  
  public class MainActivity extends AppCompatActivity {
  
  /**
   * ATTENTION: This was auto-generated to implement the App Indexing API.
   * See https://g.co/AppIndexing/AndroidStudio for more information.
   */
  private GoogleApiClient client;
  private WebView mywebView;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      mywebView = (WebView)findViewById(R.id.webView);
      WebSettings webSettings = mywebView.getSettings();
      webSettings.setJavaScriptEnabled(true);
      mywebView.loadUrl("http://mywebsite.com");
  
      mywebView.setWebViewClient(new WebViewClient());
  
  
      //Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
      //setSupportActionBar(toolbar);
  
     // FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
  
      // ATTENTION: This was auto-generated to implement the App Indexing API.
      // See https://g.co/AppIndexing/AndroidStudio for more information.
      client = new GoogleApiClient.Builder(this).addApi(AppIndex.API).build();
  }
  
  @Override
  public void onBackPressed() {
      if(mywebView.canGoBack()){
          mywebView.goBack();
      } else {
          super.onBackPressed();
      }
  
  }
  
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
      // Inflate the menu; this adds items to the action bar if it is present.
      getMenuInflater().inflate(R.menu.menu_main, menu);
      return true;
  }
  
  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
      // Handle action bar item clicks here. The action bar will
      // automatically handle clicks on the Home/Up button, so long
      // as you specify a parent activity in AndroidManifest.xml.
      int id = item.getItemId();
  
      //noinspection SimplifiableIfStatement
      if (id == R.id.action_settings) {
          return true;
      }
  
      return super.onOptionsItemSelected(item);
  }
  
  @Override
  public void onStart() {
      super.onStart();
  
      // ATTENTION: This was auto-generated to implement the App Indexing API.
      // See https://g.co/AppIndexing/AndroidStudio for more information.
      client.connect();
      Action viewAction = Action.newAction(
              Action.TYPE_VIEW, // TODO: choose an action type.
              "Main Page", // TODO: Define a title for the content shown.
              // TODO: If you have web page content that matches this app activity's content,
              // make sure this auto-generated web page URL is correct.
              // Otherwise, set the URL to null.
              Uri.parse("http://host/path"),
              // TODO: Make sure this auto-generated app URL is correct.
              Uri.parse("android-app://se.madesolutions.cmok/http/host/path")
      );
      AppIndex.AppIndexApi.start(client, viewAction);
  }
  
  @Override
  public void onStop() {
      super.onStop();
  
      // ATTENTION: This was auto-generated to implement the App Indexing API.
      // See https://g.co/AppIndexing/AndroidStudio for more information.
      Action viewAction = Action.newAction(
              Action.TYPE_VIEW, // TODO: choose an action type.
              "Main Page", // TODO: Define a title for the content shown.
              // TODO: If you have web page content that matches this app activity's content,
              // make sure this auto-generated web page URL is correct.
              // Otherwise, set the URL to null.
              Uri.parse("http://host/path"),
              // TODO: Make sure this auto-generated app URL is correct.
              Uri.parse("android-app://se.madesolutions.cmok/http/host/path")
      );
      AppIndex.AppIndexApi.end(client, viewAction);
      client.disconnect();
  }
  }
  </code></pre>
  
  <p>What i have done is that I have implemented Facebook login on my website where users can login easy. This works great when I test on Desktop computer but when trying to login through the Android app which launches same website i'm just getting a blank webpage after login with Facebook.</p>
  
  <p>Does anyone have any ideas how to solve this? All help appriciated. </p>