views:

24

answers:

1

I'm planning to release a nice clock widget and I'd like to include a pretty wallpaper with it (want to do this because previously got some comments like "can i get the matching wallpaper? ;)")

So I tried to google on how to put some image file inside apk so that it would appear in wallpapers selection list after installation. I mean the list which appears when doing Home=>Menu=>Wallpaper=>Wallpaper Gallery or Pictures - whatever.

So far didn't find any hints, so decided to try to ask here.

Any hints on how to do that?

A: 

You could package the wallpaper in res/raw, and then when your app fires up for the first time, attempt to copy it to the sdcard directory /media/pictures.

You should be using methods such as getExternalStorageDirectory or getExternalStoragePublicDirectory (depending on the API level) to open the file.

http://developer.android.com/guide/topics/data/data-storage.html#filesExternal

Cylindric
Aha, seems like a way to go, thank you! I guess there's no way to do that automagically :)
dpimka