This blog post contains supplementary material for a video from my YouTube channel. In this video, I will be covering how to access and save photos in an Android application.

You can fork or download the starter code on Github.

There are 15 steps in total.

Step 1. Define a new constant.

Step 2. Open the gallery.

Step 3. Handle the Activity results.

Step 4. Add a camera request code.

Step 5. Launch a camera activity.

Step 6. Handle the camera response.

Step 7. Add the image variable.

Step 8. Accept a bitmap variable as a parameter.

Step 9. Add a new column.

Step 10. Add a new pair.

Step 11. Add a new getter.

Step 12. Convert an image into a string and back.

Step 13. Read the new column.

Step 14. Display the drawable from the database.

Step 15. Resize the image before storing it in the database.

You can find the complete code in this repository.

Hope you found this tutorial useful! Let me know if you have any questions. 🙂

%d bloggers like this:

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Subscribe!