get file location in android?
<p>I use the following code to check file availability </p>

<pre><code>    File f1=new File("/data/data/com.myfiledemo/files/settings.dat");
    if(f1.exists())
    textview.setText("File Exist");
</code></pre>

<p>If i use the following code it's not responding</p>

<pre><code>   File f1=new File("settings.dat");
   if(f1.exists())
   tv.setText("File Exist");
</code></pre>

<p>Here com.myfiledemo is my application package . I simply create the file like this </p>

<pre><code>   fileInputstream = openFileInput("settings.dat");  
</code></pre>

<p>why It's not responding for the second if condition.??Is it Wrong?? </p>
