سؤال

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

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top