Read Resources from SD card
Suppose we have downloaded some files from somewhere to the some resources folder on the SD card. Now, let's be able to use th开发者_StackOverflow中文版e downloaded. Jpg image as the background, and play audio clip. How to implement reading data from the SD card or phone memory (com.example.app or etc folder)? For example, if resources located into the application, then I read so
layout.setBackgroundResource (R.drawable.img);
And I need instead of R.drawable.img
i must read from an SD card or phone memory. The sound of my own class, but the principle of reading should be the same
sound = getAudioClip (R.raw.sound);
where instead of R.raw.sound
must-read SD card or phone memory.
Look at this sample to know how to fetch and display images from the SD card
Images from SD Card
精彩评论