I see some wallpaper apps on the market and they update the images daily or weekly. I wonder how they do that. I use picasso library but I cannot do that with picasso. Is there anyone can help?
One way to achieve what you want is you can make webservice/api to pass image url from the server and now anytime whatever image url that api will respond/contains that you can load in your ImageView. And that't it.
Note - You must have a knowledge of making webservice and calling them and handling the http request response in advance for this before applying this approach.
Thanks.
Related
I have a form with 10 images which need to be downloaded from my server. The problem I have is that when the form is displayed, the library I'm using will start downloading all 10 images at the same time causing some of the image download requests to time out. (I don't know why it does)
So I think I could fix this by changing my code to download one image at a time.
Is my understanding correct in that I should treat each of the image download request as an Async task and chain them together so that only one image download request will be processed at a time?
Any libraries I should look into to save time in implementing this? Or any other techniques I should be aware of?
This answer is from the comments I had to this question.
You can use an AsyncTask.
You can update the ui when each has finished in the functions:
onPostExecute()
onPreExecute()
onProgressUpdate()
you can try Image loading lib Glide. You can set priorities for image loading so this can be achieved using Glide.
Here is link
I am developing android app that shows an image from URL. For this, I'm using Picasso library and it is working nicely. However, I think its caching time period depends on the headers of the image URL.
I have set Cache-Control:max-age=0 for image URL header and Picasso is only caching for few days and I want to store these images more than few days. Please help me find out the solution.
According to this answer there is no way to tell picasso to use some custom cache period.
I want to download an image from the web server for every 1 second. Can some one tell me the best approach to achieve this. Currently, i am thinking to use Executer class but i am not sure whether that would be a better approach or not. Please help me.
to perform this you might need use asynctask. this is my idea, retrieve all the image url from the server,then manipulate the url. you can use library such as android smart android view to display the image from the server just by only providing the image url.
android smart android view:-
http://loopj.com/android-smart-image-view/
I'm going to be making a wallpaper app but need some guidance on how I am going to be able to store, retrieve and view the wallpapers.
Will I need to make use of ImageView so I will be able to display the images?
I'm going to need some sort of database/website to store all of the wallpapers on. What would be the best thing to do, use a database or a website?
How would I go about retrieving the wallpapers from my chosen source?
Any help/advice would be appreciated, thanks.
A common practice is to use an rss feed of images. Then, just hook up your app to the rss feed and have it check for updates periodically.
Here is a reference on reading xml (rss) in Android:
http://www.ibm.com/developerworks/opensource/library/x-android/index.html
Good luck.
you can try aquery android library for lazy loading image. this library store images in cache memory so you not need to store it externally also it will take some time for first time loading image from web but once it load in your application then it will automatically store in cache so second time take very less time to display also its less time consuming then other lazzy loading methods..below code may help you.....
AQuery aq = new AQuery(mContext);
aq.id(R.id.image1).image("http://data.whicdn.com/images/63995806/original.jpg");
You can download library from from this link
Personally I would use a database. But the easiest option would be to use the 'res/drawable' folder in android I guess.
If you stored them on the internet and haven't got connectivity, you can't get your images, so users won't necessarily like this.
To get at them from a database you'll likely have to know some SQL or know someone who knows a bit of SQL. The advantage of storing them in a database would be that it's one neat package and it is portable.
Don't worry about using ImageView it, you just need to get the image from the source (database /filesystem etc..) and give it to the imageView
I have an android application, that will call a SOAP web service for some data.
For the purpose of this question, we'll assume its data about cars.
I've got as far as returning text data about the car (make, model etc), that is the easy part. I'd also like to return an image of the car some how.
So far, I see two viable options :
Retrieve the image in the SOAP response (don't even know if this is
possible)
Retrieve a URL in the SOAP response that points to the image,
perhaps a URL to a web image
Could anyone please give advice as to what is a robust solution for achieving this?
Thanks
Option 2, definitely. If you do option 1, you're limited to displaying only after you've completely downloaded the entire message, including the encoded images. That can take a while. On the other hand, if you just include URLs, you can download the message, render your UI, then download the images and update those image views dynamically as the images finish fetching from the web. This results in a much more responsive UI, especially in a mobile environment where your data connection may not be as fast or reliable.