title: Redirect chrome programmatically
body: <p>I have been able to read the chrome content using accessibility service using the below code</p>
  
  <pre><code>&lt;accessibility-service   xmlns:android="http://schemas.android.com/apk/res/android"
  android:accessibilityFlags="flagDefault"
  android:accessibilityEventTypes="typeWindowStateChanged"
  android:accessibilityFeedbackType="feedbackGeneric"
  android:notificationTimeout="0"
  android:canRetrieveWindowContent="true"
  android:packageNames="com.android.chrome"
  android:description="@string/accessibility_description"
  /&gt;
  </code></pre>
  
  <p>And I listen to window changed event using</p>
  
  <pre><code>public void onAccessibilityEvent(AccessibilityEvent event) {
  if(AccessibilityEvent.eventTypeToString(event.getEventType()).contains("WINDOW")){
       AccessibilityNodeInfo nodeInfo = event.getSource();
       dfs(nodeInfo);
  }
  }
  
  public void dfs(AccessibilityNodeInfo info){
  if(info == null)
      return;
  if(info.getText() != null &amp;&amp; info.getText().length() &gt; 0)
      System.out.println(info.getText() + " class: "+info.getClassName());
  for(int i=0;i&lt;info.getChildCount();i++){
     AccessibilityNodeInfo child = info.getChild(i);
     dfs(child);
     child.recycle();
  }
  }
  </code></pre>
  
  <p>Now based on URL content , I want to open a redirect chrome to a different page or load a static page after fetching it from the device storage. I tried to achieve it but have been unsuccessful till now. Any help would be appreciated. Thanks in advance.</p>