I'm trying to develop an android app which displays the images stored in a database hosted on a server . As of now , i'm using Firebase , which supports only text and i'm storing the url of the image to be displayed in my app .
Are there any other options for me to store images on the internet and retrieve them in my App ?
You can encode the images themselves using Base64 and storing them directly. But what you are doing is usually the best option.
To learn how to encode images to Base64, see here:
https://stackoverflow.com/a/9224180/5935255
Related
I have a running website where i have images of products uploaded in a directory and the respective
images name in mysql database. Now, i have my mobile application (android) connected to my running website
database through an API that does the communication.
Technology used for my application development
1. Android Studio (IDE)
2. Retrofit for communication with the Slim
3. Slim for the API
4. Mysql for storage
ISSUES
Product upload is only allowed on the website.
How can i have access to the product images in the image folder of my running website to be displayed
on my android app through the API. Am only having access to the image name which was stored in the
database after product upload on my website.
Am i to have the whole image content uploaded in database using BLOB when uploading product on my
running website.
Please, kindly assist me in resolving this.
THANK YOU.
You don't want to store an image in the database as BLOB, now you are getting the file name using the API and you know the file stores server path, then you can achieve those images like this.
Here am using picasso image library to set your images to ImageView in android , you can use different tricks to set image.
String filename = "yourProductImageName.png" //this is the filename you get from api
String filepath = "https://yourDomin.com/imagesdirectory/" + filename;
Picasso.get().load(filepath).into(imageView);
I have a folder on my computer with many images. I want to have my app be able to load all of these images into a View. I have no problem loading one image from its url (using Picasso) but I want to know how to load a folder of them (i.e the amount of images may change).
I was thinking that I could use a Google Drive public folder to store the images, but how could I get the images from within the folder (i.e if I had the folder's URL could I use Java to "open and look inside" it)? Is there a better (and free) way than Google Drive to store the images? Maybe an imgur album or some kind of free server hosting service?
You can use Firebase or Alternative use is Imgur . You store images there and the links of images tou can store in a db (sql Lite) and just add connection of db in main.activity Here you can learn how
You should consider using Firebase for this. Upload your Images in the Firebase Storage and store the link in the database. Once done, you can show all the Images in your app and also dynamically add the images.
I would like to generate a PDF usgin data from my databse to a preset PDF template. The question will be, do you think or is it possible to send data or generate this pdf to a template using Android or do you think it is best to send the data to a server and have the server generate the PDF instead?
I know that Android can generate a PDF, but the bigger question will be can it insert data into a layout template and then generate it?
I am working on one android application,in that I have to download images from web and I am showing in listview using imageloader.Next time if I am not connected to internet I have to show saved images.So that If I want to save downloaded images where I have to store.I have two ways one way I have to store in sdcard and another one is in database.Is there any alternative way to store images.Image sizes are very small
Try it with Cache? Best way to do this:
http://www.androidhive.info/2014/05/android-working-with-volley-library-1/
Volley gives you a NetworkImageView, this is a "normal" ImageView, but you can give it a URL and volley will do all the rest for you (download, or load from cache, if already loaded).
i wanna display image saved on the D://foldername//foldername//filename from my computer on the android emulator using eclipse and also how to display it from a server?
as i am accessing the data from the server and also the images are saved on the server
Unless you're running a web server which provides public access to the image, I don't think you can display an image from your computer using a path like that. You either need to include the image in the assets or res/drawable folders within the app, or have the image accessible through a web server which you can load from within the app using the method described in this question.