How to run my Intent if file exists
<p>I want to run my Intent if the file exists, otherwise show a message that the file is not found. This is my code</p>

<pre><code>if (!file.exists())

 {
  Toast.makeText(MyActivity.this, " the file not found",Toast.LENGTH_LONG).show();
 }      

 {
  Intent intent = new Intent(getApplicationContext(),BooksActivity.class );
  startActivity(intent);
 }
</code></pre>
