简体   繁体   English

Android:启动图库应用程序,选择多个图像,返回URI

[英]Android: Launching gallery app, picking multiple images, returning URIs

I'm attempting to launch the Gallery app (or any third party gallery apps) from my application in order to allow the user to select multiple images, then return the URIs. 我试图从我的应用程序启动Gallery应用程序(或任何第三方画廊应用程序),以允许用户选择多个图像,然后返回URI。 I am currently able to select a single image, however I can't figure out how to select more than one. 我目前可以选择一个图像,但是我不知道如何选择多个图像。

I don't really want to use a custom gallery. 我真的不想使用自定义画廊。 However, if there is no way to solve this problem without using one, I suppose that's the approach I will have to take. 但是,如果不解决一个问题就无法解决这个问题,那么我想这就是我必须采取的方法。

I'm not sure if you ever found an answer to this, but since I've been looking for something similar, I figure I would reply. 我不确定您是否找到了答案,但是由于我一直在寻找类似的答案,所以我想我会答复。

There doesn't appear to be a way to select multiple images without using or writing a custom version of the gallery. 似乎没有一种方法可以选择多个图像而不使用或编写画廊的自定义版本。 If you haven't already come across it, there is an open source one available at: 如果您还没有找到它,可以在以下位置找到一个开放源代码:

https://github.com/vikaskanani/Android-Custom-Gallery-And-Instant-Upload https://github.com/vikaskanani/Android-Custom-Gallery-And-Instant-Upload

and the writer's blog is available 和作者的博客可用

http://vikaskanani.wordpress.com/android-custom-gallery-and-instant-upload-project/ http://vikaskanani.wordpress.com/android-custom-gallery-and-instant-upload-project/

It allows for multiple selection, image preview and taking photos. 它允许进行多项选择,图像预览和拍照。 It seems to be targeted for Android 2.3.1 but I believe without much trouble it will work with Android 2.2. 它似乎是针对Android 2.3.1的,但我相信它可以在Android 2.2上正常工作。

It seems to work pretty simply and you should be able to modify it for your project as needed. 它看起来很简单,您应该能够根据需要为项目进行修改。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从图库中选取照片后,Android应用消失 - Android app disappears after picking photo from Gallery 当我在列表中找到这些图像的Uris时,如何使用画廊使用意图从外部存储查看多个图像 - How do I use gallery to view multiple images from external storage using intents when I hava Uris of those images in a list 从库中选取图像时发生FileNotFoundException - FileNotFoundException while picking images from gallery 如何设置setImageResource,我有手机的图库图片的URI - How to set setImageResource, I have URIs of the gallery images of my phone 从图库中选取图像后,android应用程序崩溃-cursor.getColumnIndex返回-1 - android app crashes after picking a image from gallery - cursor.getColumnIndex returns -1 在Android应用程序中从图库中选取图像 - image picking from gallery in android application Android的相册应用如何查看图像? - How does Android's photo gallery app views Images? 使用Intents从Android上的照片库中选择多个图像 - Select multiple images from Photo Gallery on Android using Intents 从Android图库中选择多个图像并获取路径 - Select multiple images from android gallery and get it path 使用Intents NullPointerException从Android的照片库中选择多个图像 - Select multiple images from Photo Gallery on Android using Intents NullPointerException
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM