# Read window.status WebView android

**URL:** https://discourse.processing.org/t/read-window-status-webview-android/30978
**Category:** Processing for Android
**Created:** [June 30, 2021, 3:36pm UTC](https://discourse.processing.org/t/read-window-status-webview-android/30978 "2021-06-30T15:36:57Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Syed\_Daanish](https://avatars.discourse-cdn.com/v4/letter/s/a6a055/32.png) [@Syed\_Daanish](https://discourse.processing.org/u/Syed_Daanish)
#### Post date: [June 30, 2021, 3:36pm UTC](https://discourse.processing.org/t/read-window-status-webview-android/30978/1 "2021-06-30T15:36:57Z")

</div>

How to read and get window status in Android mode processing I mean this in js of index.html:-

```javascript
window.status = "Hello User!";

```

If this was loaded in the application as html then I want to read it and process it in my application `;)`  
here is my code:-

```auto
FrameLayout fl;
Activity act;
WebView web;
Context context;
WebViewClient wbc;///if you want to use chrome
File[] files;//if you want to list files
String[] filesPath;//if you want to list subfolders
 
void settings(){
  fullScreen();
};
 
public void onStart() {
  super.onStart();
 
  act = this.getActivity();
  wbc = new WebViewClient();
  web = new WebView(act);
  web.setLayoutParams(new RelativeLayout.LayoutParams( RelativeLayout.LayoutParams.MATCH_PARENT,RelativeLayout.LayoutParams.MATCH_PARENT));
  web.setWebViewClient(wbc);
  web.getSettings().setJavaScriptEnabled(true);
  web.loadUrl("file:///android_asset/index.html");
  fl = (FrameLayout)act.getWindow().getDecorView().getRootView();
  fl.addView(web);
};
 
void setup(){
  background(255,0,0);
};
 
void draw(){
   background(255,0,0);
};

```

I’m obviously missing the imports here they are :-

```auto
import android.content.res.AssetManager;
import android.webkit.WebViewClient;
import android.os.Looper;
import android.content.Context;
import android.view.ViewGroup.LayoutParams;
import android.webkit.WebView;
import android.view.ViewGroup;
import android.app.Activity;
import android.widget.RelativeLayout;
import android.widget.FrameLayout;
import java.io.File;
import android.os.Bundle;
import android.os.Environment;

```

So how do i get the window status??
