I am working on an android application that will include the main functions of the image gallery. I managed to create an activity that retrieves a list of photos from my application API and displays them in a gridview in Android.
Here's what it looks like at the moment:

However, I am having difficulty creating the same gallery experience for photographs of user devices that were taken by the camera and saved on the device. The two solutions that I considered were:
- Build your own image gallery.
- Launch the default image gallery for Android using intent.
Solution 1: I believe that the first solution will take too much time to develop. I started with this tutorial , but as soon as I implemented it, I found out that it works too slowly. Then I look at the camera android camera source code to find a solution, but again I found that it would take me too long to view the code and create my own gallery from scratch. I also believe that it is not in the philosophy of Android OS to rewrite existing functions, but to use Intents to trigger actions that can handle the necessary actions. This led me to the second solution.
Solution 2: I tried calling the default Android gallery, using intention to view photos of user devices, I was soon stuck again. The problem this time was that as soon as the user clicks on the photo, the gallery exits and returns to the activity that launched it itself, and I expected (and want) to start a large viewing of the image. I saw that others also had this problem of how to open a gallery using intention with no result . Since I did not find a fix for this, I decided to leave.
My question is how can I overcome these problems and create a gallery similar to the one I already have for web photography. If anyone could give me a link, I would be very grateful.
Borivojević
source share