I am trying to open the gallery app from my android application. I want to just open the gallery app and not other apps with like fotos.
I have tried
intent.setAction(Intent.ACTION_GET_CONTENT);
intent.setType("image/*");
and
intent.setAction(android.content.Intent.ACTION_VIEW);
intent.setType("image/*");
and
intent = new Intent(
Intent.ACTION_PICK,
android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
The problem is that all this show a dialog where I can pick again from all apps that have images. So it shows a dialog with "Gallery", "Fotos", etc....
Is there a possibility to open just one app, without having to chose again?
EDIT: If you want to use the gallery API, which does show photos from all photo apps on the phone and which is not a standalone user-accessible app itself, you could use this code:
Unfortunately, I don't believe choosing photos from a specific app is possible, as "the gallery app" that comes installed on devices varies by manufacturer and OS skin. For example, the default gallery on Pixel devices is actually Google Photos.
If I misunderstood, and you do want to simply launch the Gallery app, you can include the following code in your /src/[ActivityName].java file:
Notice that the app being opened is Gallery, the default Samsung photo gallery app. If you want to replace this with Google Photos, you would replace
com.sec.android.gallery3dwithcom.google.android.apps.photos.