How to make an image reference?

Asked

Viewed 63 times

0

I want to make simple app where user select an image of SD card and then can save its reference in sqlite so it can be displayed in a listview, but still do not know how I can make this reference.

  • What if the user deletes the SD image?

  • If you are getting the Gallery image using Intent.ACTION_PICK see this reply

  • Share your attempts, your codes, your mistakes so it’s easier to direct you.

1 answer

0


For you to do this you would first have to do with what the user must have that folder with the images you want to show. As you want to make a simple app and a demo, I advise you to do the opposite way: 1- Choose several image links that you want to store in the folder (Website Urls). 2- Inside the application, using Asynctasks or other mechanism, download the images, create the folder where you want to save the photos in the SD, and save the images there. 3- Once you confirm that the images are saved, or as you save them in the folder, you can get Uri(path to location on the image is saved) and put it in your comic book. 4 - When you want to show in a list or something like that, you just need to go to the BD, load all the Uris and using libraries like Picasso, Volley etc, you can upload the images to an Imageview.

I answered a similar question that is here: Save images in the database and then show in a listview

Browser other questions tagged

You are not signed in. Login or sign up in order to post.