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

    boolean isEntryPoint = false;
    rotateScreen(this);

    ApplicationData applicationData = SplashActivity.getApplicationData();
    if (applicationData != null) {
      Intent intent = getIntent();
      isEntryPoint = (Boolean) intent.getSerializableExtra(ApplicationData.IS_ENTRY_POINT_TAG);
      NextLevel nextLevel = (NextLevel) intent.getSerializableExtra(ApplicationData.NEXT_LEVEL_TAG);

      QrActivityGenerator generator =
          (QrActivityGenerator) applicationData.getFromNextLevel(this, nextLevel);
      DefaultAppLevelData appLevelData =
          (DefaultAppLevelData) generator.getAppLevel().getData(this);
      dataItem = (QrLevelDataItem) appLevelData.findByNextLevel(nextLevel);

      generator.initializeActivity(this);
    } else {
      Intent i = new Intent(this, SplashActivity.class);
      startActivity(i);
      finish();
    }
    // createToolBar(isEntryPoint);
    createMenus(this, isEntryPoint);
  }
 @Override
 protected void onStop() {
   super.onStop();
   if (generator == null || generator.getWebview() == null) return;
   Log.i("WebView", "onStop()");
   try {
     Class.forName("android.webkit.WebView")
         .getMethod("onStop", (Class[]) null)
         .invoke(generator.getWebview(), (Object[]) null);
   } catch (IllegalArgumentException e) {
   } catch (IllegalAccessException e) {
   } catch (InvocationTargetException e) {
   } catch (NoSuchMethodException e) {
   } catch (ClassNotFoundException e) {
   }
 }