I am trying to open an image/picture in the Gallery built-in app from inside my application as described in here.
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.
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?
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. probably not the best option but it works since there is no way to tell the image picker what images to show
Related
I am working on an App which is selecting a single picture at a time from the gallery. Right Now I have used the intent to open the gallery. But I do not want to use this. This is just because of the Use Case which is as below :
If the user Selects the Picture which is not in Portrait then my app should show him dialog to warn him that he is selecting the wrong Photo. Only Portrait photos are allowed.
So for this, I think If I would open the gallery by intent I can not achieve this, So I moved to another Idea , to bring all the photos from the gallery into the app. For this I tried using the Universal image loader, But Unfortunately it is slow and not looking good.
So is there any way to open the device Gallery into the app directly so please guide me share me the code or any link. thanks
I want to acess gallery of an android device to get an photo, but I want that it shows the photos separeted by its folders.
I got a lot of examples, but all of them show the items in the same place.
A similar way that WhatsApp works when we want to pick a photo send.
Thanks in advance.
The device is Samsung Galaxy III. I developed an APP to run the camera activity and capture an image. After analyzing the image, I print out some text information. Right now every captured image is saved at gallery. I don't need the image to be saved in gallery or SD card. I think either of the following two solutions will work for me, but I don't know how to program it:
avoid saving pictures to gallery.
delete the picture somewhere in the APP.
Any comments are appreciated.
Read Android Camera tutorial.
...
Storage - Are the images or videos your application generates intended to be only visible to your application or shared so that other applications such as Gallery or other media and social apps can use them? Do you want the pictures and videos to be available even if your application is uninstalled? Check out the Saving Media Files section to see how to implement these options.
or see this one: How to save image captured with camera in specific folder.
In the Camera intent when starting, add this:
intent.putExtra(MediaStore.EXTRA_OUTPUT,Uri.fromFile(getTempFile(context)));
I solved my problem with following two steps:
as '#auselen' pointed, save all the images to a specific folder. How to save image captured with camera in specific folder.
delete all the images in that folder somewhere in the APP. How to Delete Image From SDCard in Android
use this for delete a pic
ImgPhoto1.setImageBitmap(null);
I would like to be able to create an Android app that adds additional photo albums to the default android photo gallery. The content of these albums would be remote, similar to how the Picasa albums are handled. I have looked into the media scanner and it seems to not handle remote content and I have not been able to find any reference for the gallery itself or any other means of providing additional photo albums.
I have done some searching on the android developers site, here and general Googling and have come up short... does anyone have any suggestions about how this can be accomplished?
Thanks in advance.
If you are talking about the android stock gallery, this is what ive found out:
The android albums are not actually albums, but folders.
You justo need to create a folder with the name you want the album to show and there must be at least one picture in it.
Hope it helps!
I'm developing an application that requires the functionality allowing the user to browse through the Sd card and select an image of his choice as the background for the application.
This image is assumed to be in the sd card. But the name and location(specific) folder is unknown.
I got the code of getting an image to my background. This is the code but here the filename is known in advance. I want the user to select the file he needs.
I also referred to this code but couldn't link the two of them. Can someone provide me with a solution? Thanks in advance..
Before starting the MainActivity, use an another activity in which in onCreate call the ImagePicker Code. After selecting an image, after coming back to onActivityResult, call the mainActivity and pass the Image path with Intents. Then use the as usual code that you have to set it as back ground.