title: how to set variable in android from javascript return value
body: <p>i have JS which return the value</p>
  
  <pre><code>function sendDisplay()
  {
   var dis = alert(reader.dom.find('controls_contents_container').style.display);
   return dis;
  }
  </code></pre>
  
  <p>in android i try to set the return value so i can make a if else statement in android</p>
  
  <pre><code>public class MainActivity extends DroidGap {
  
     @Override
      public void onCreate(Bundle savedInstanceState) {
          CookieManager.setAcceptFileSchemeCookies(true);
          super.onCreate(savedInstanceState);
          super.setIntegerProperty("splashscreen", R.drawable.cover);
          super.loadUrl("file:///android_asset/www/index.html",1500);   
  
      }
  
  
      @Override
      public void onBackPressed() {
          super.loadUrl("javascript:alert(sendDisplay())"); 
  
  
      }
  
  
  }
  </code></pre>
  
  <p>when i alert in loadUrl method, its show value from JS. but i dont know how to set that value to android variable.</p>
  
  <p>TQ</p>