I'm currently working on a project that involves retrieving all photos stored on your phone. My initial research into this brought up one of Android's built-in content providers called MediaStore. The idea is that you search the MediaStore for images and it'll return you a list of photos on your device. You can then use built-in Android commands to retrieve cached thumbnails and full images.
This all sounds great, until I started implementing it and testing on my HTC Incredible.