Trying to display images from a specific folder in the Android hardware device
<p>//posense is a directory in the Android hardware device and there are some pictures in the directory</p>

<pre><code>    ImageView image1, image2;

    File imagedirectory;
    File[] imagepool;

    @Override
    public void onCreate(Bundle savedInstanceState) 
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        image1 = (ImageView)findViewById(R.id.imageView1);

        imagedirectory = new File("/posense"); 

        imagepool = imagedirectory.listFiles();

        image1.setImageResource(imagepool[1]); //this line is giving me an error

}
</code></pre>

<p>How can I solve this problem? </p>
