Wallpaper activity in android

I am making a wallpaper activity in my android app. The activity will display all the Wallpapers in a grid.
One way i can think of doing is save all the wallpapers in my drawable directory. Now that is somewhat problem as the drawable directory does not allow to create a subfolder inside it. As there will be several other images inside it will be difficult to differentiate wallpaper from images.

Other way i can think of is getting the wallpaers by making a server call.

Please suggest which way is better and which one to use.

Rohit BajajAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

KRUNAL TAILORFreelance Mobile DeveloperCommented:
Hi Robinsuri,

The solution of your problem is inside your question only.

For first way drawable directory not allow to create sub directory(folder) then you may create a folder in "res". Parent of  drawable directory. There you will allow to create sub directory(folder).

First way:
- No need server
- Big Apk Size (because all wallpaper images go inside the apk bundle)
- When you need more wallpaper you need to release one more version. For future you may add more wallpaper it will require you a version update

Second way:
- Easy to add/delete wallpaper on server, no need to manage the app versions. For future you may add/delete image on server app will automatically handle new images with web service call.
- Small apk size
- Need server (Means extra cost, affects your budget)
- Require internet based app. No network on device will affect the app.

See, this thing is totally depend on you. I will suggest you to use server (second way) to manage wallpaper for apps. It will reduce the time, efforts but it will affects your pocket. Final call is yours, you may go with first way also.

Thanks & Regards,
Krunal T. Tailor
Rohit BajajAuthor Commented:
hi thanks for explanation i got the point.
i want to discuss both cases
like if i bring the wallpapers thru network call. where will the wallpapers get stored ?
also do i need to make network call each time to load the wallpapers ? or make it once and use the saved ones.

also wallpapers need to be of all sizes ie. hdpi, mdpi, xhdpi, xxhdpi. i think thats not gonna be an issue just confirming
KRUNAL TAILORFreelance Mobile DeveloperCommented:

I think you need to implement app in a way that every particular time duration it will call the webservice and update the wallpaper inside the app. So, no need to call every time, it will reduce the webservice call and reduce the server traffic. The app will call and update it on every time launch or call after some specific time.

Refer this link for storage option in android. Using the External Storage you will achieve this.

no issue with the image sizes but may be chance of exception with big size image arise, you may avoid it by proper exception handling.

Thanks & Regards,
Krunal T. Tailor

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Rohit BajajAuthor Commented:
Thanks a lot!! that was really good explanation
KRUNAL TAILORFreelance Mobile DeveloperCommented:
Welcome. Happy to help you.
Enjoy Coding.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.