Questions tagged [android-gallery]

Questions regarding using Android gallery application. Gallery application is the official media app installed on all Android mobile devices. The app allows browsing, organizing, sharing and editing of media (photos and videos).

Gallery application is the official media app installed on all Android mobile devices. The app allows browsing, organizing, sharing and editing of media (photos and videos).

Reference: Android Developers Gallery class overview

1181 questions
348
votes
10 answers

How to pick an image from gallery (SD Card) for my app?

This question was originally asked for Android 1.6. I am working on photos options in my app. I have a button and an ImageView in my Activity. When I click the button it would redirect to the gallery and I would be able to select an image. The…
Praveen
  • 90,477
  • 74
  • 177
  • 219
217
votes
20 answers

Android Gallery on Android 4.4 (KitKat) returns different URI for Intent.ACTION_GET_CONTENT

Before KitKat (or before the new Gallery) the Intent.ACTION_GET_CONTENT returned a URI like this content://media/external/images/media/3951. Using the ContentResolver and querying for MediaStore.Images.Media.DATA returned the file URL. In KitKat…
156
votes
16 answers

Allow user to select camera or gallery for image

What I'm trying to do seems very simple, but after a few days of searching I can't quite figure it out. I have an application that allows the user to select multiple(up to 5) images. I'm using an ImageView. When the user clicks on the ImageView,…
88
votes
6 answers

How to implement HorizontalScrollView like Gallery?

I want to implement Horizontal ScrollView with some features of Gallery, In Gallery the scroll made at some distance it arrange in pair, i.e If we have three images shown in screen, clicking last image will arrange at center. How would I implement…
Jayesh
  • 3,661
  • 10
  • 46
  • 76
63
votes
7 answers

Android getting an image from gallery comes rotated

I am trying to let users select a profile picture from gallery. My issue is that some pictures come as rotated to the right. I start the image picker like so: Intent photoPickerIntent = new…
TareK Khoury
  • 12,721
  • 16
  • 55
  • 78
57
votes
5 answers

Get Image from the Gallery and Show in ImageView

I need to get an image from the gallery on a button click and show it into the imageview. I am doing it in the following way: btn_image_button.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v)…
Android Nerd
  • 625
  • 1
  • 8
  • 13
50
votes
3 answers

Choosing photo using new Google Photos app is broken

My app has ability to select photo from library. Exactly I want file path from this selection. This is the code to create intent for selecting photo: Intent photoPickerIntent = new Intent(Intent.ACTION_PICK, …
Den Drobiazko
  • 1,077
  • 1
  • 13
  • 33
44
votes
11 answers

Get the file extension from images picked from gallery or camera, as string

I want to get as string the image extension (for example "jpg", "png", "bmp" ecc.) of the images loaded from the gallery or picked from the camera. I have used a method in this form to load images from the gallery private static final int…
AndreaF
  • 11,975
  • 27
  • 102
  • 168
43
votes
4 answers

Android get Gallery image Uri path

In an Activity, I can choose an image from the Gallery, and I need its Uri path (in the log, the Uri path for my test image is /content:/media/external/images/media/1). I'm getting this error though: 08-04 02:14:21.912: DEBUG/PHOTOUPLOADER(576):…
Allan Jiang
  • 11,063
  • 27
  • 104
  • 165
39
votes
8 answers

Android : How to detect the image orientation (portrait or landscape) picked from gallery while setting on an imageview?

I am setting an image on the imageview picked from the gallery(camera album). If the picked image has landscape orientation, it displays perfectly but if the image in in portrait mode(i.e the image was clicked in portrait mode) it is displaying the…
sarabhai05
  • 578
  • 1
  • 4
  • 12
38
votes
9 answers

upload picture to emulator gallery

I want to add picture in emulator's gallery. But i am not able to do this. How to do this? any clue! Though i have gone through a answer posted in stack over flow but didn't get success with that answer.
Sudipta Som
  • 6,537
  • 9
  • 43
  • 67
35
votes
8 answers

Get filepath and filename of selected gallery image in Android

I am creating an app which uploads a selected image from the gallery and uploads it to a web service. The webservice requires the filename of selected image plus a base64 encoding of the file contents. I have managed to achieve this with a…
amburnside
  • 1,943
  • 5
  • 24
  • 43
33
votes
9 answers

how to add images to android emulator?

any one guide me how to add some images to emulator image gallery?
UMAR-MOBITSOLUTIONS
  • 77,236
  • 95
  • 209
  • 278
29
votes
3 answers

Getting Image from ImageView

I have a gallery that shows an array of images, when clicked they are displayed in an imageview. I want to be able to SHARE the image that is currently being displayed in an intent chooser. I can't figure out how to select the current image. Gallery…
Nick Nelson
  • 1,131
  • 2
  • 18
  • 36
29
votes
8 answers

Loading all the images from gallery into the Application in android

I am creating an application wherein I need all the images in the gallery into my application that has a girdview in it. I want all the images from all the folders to appear in the gridview. String[] proj = { MediaStore.Images.Media.DATA,…
android_developer
  • 663
  • 2
  • 13
  • 18
1
2 3
78 79