title: Close an activity or go back from withing webview using javascript
body: <p>I have an android activity with WebView in it. When the activity loads with a page, it has two buttons (in html) one for accept and one for decline.</p>
  
  <p>When the user clicks accept, the application works the way it should.</p>
  
  <p>What I want is when a user clicks the decline button, the application should go to the previous activity. Since this is a webview so it has to be done through javascript. I have already tested running javascript and can execute toast messages from webpage. </p>
  
  <p>I want an exact line which I should write to close the activity, or go back.</p>
  
  <p>Secondly, can I track the URLs which web view is going to, as Once the job of webview is done, and it goes to a specific page, and from there I want to return to my application, how can this be done?</p>