简体   繁体   English

从Android Gallery和Picassa中选择图像

[英]Picking an image from Android Gallery & Picassa

I am trying to open an image/picture in the Gallery built-in app from inside my application as described in here. 我试图按此处所述从我的应用程序内部在Gallery内置应用程序中打开图像/图片

My "picker" activity works fine as long as the image is stored in the device, but the gallery app also displays images from Picassa, which returns a null path. 只要图像存储在设备中,我的“选择器”活动就可以正常工作,但是图库应用程序还会显示Picassa中的图像,并返回空路径。

Does anyone knows how to fix this, either by getting the path or tell the "picker" intent to ignore Picassa as a provider, and only show me what is on my device? 有谁知道如何解决此问题,或者通过获取路径还是告诉“选择器”意图忽略P​​icassa作为提供者,而仅向我展示设备上的内容?

Thanks. 谢谢。

I had this same problem here 我在这里有同样的问题

What I did was just check the returning Uri to see if the selected image was a picassa image. 我所做的只是检查返回的Uri,以查看所选图像是否为picassa图像。 probably not the best option but it works since there is no way to tell the image picker what images to show 可能不是最佳选择,但它可行,因为无法告诉图像选择器显示哪些图像

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM