-1

I just wanted to know ,how many images (1000 in numbers ) in drawable folder can be stored in android apps

Regards

user2761034
  • 57
  • 1
  • 4
  • Depends on device AND images but I think that `16MB` is a minimum memory space per application. You'd have to calculate the number yourself basing on your images average size etc. – Celebes Sep 11 '13 at 14:49
  • @Celebes That's the heap size, not the storage size. He's asking how many can be put into the `drawable` folder, not loaded into memory at once. – Geobits Sep 11 '13 at 14:59

2 Answers2

3

I dont think that number of images is limited. What limits you, is total size of your .apk package. If you want to publish to google play (which i suppose you do want), the .apk size limit is 50MB.

There are other factors that could limit your maximum .apk installation size, you can read more about them in this post

Community
  • 1
  • 1
hendrix
  • 3,364
  • 8
  • 31
  • 46
2

If you look at R.java, you can see that drawables are assigned an id in the form of 0xPPPPNNNN, where P is the drawable prefix and N is the actual id within that area. So, the maximum number may be limited to 2^16, or 65536. I haven't tried more than that, but it should be plenty for most needs.

On the other hand, it's likely that you'll reach the file size limit before that. An apk file is limited to 50MB. You can add expansion files to that to bring the total up to 4GB, as described on the Android Developer's Blog.

It mainly depends on the size of your images which you'll hit first. 4GB / 65536 = 64KB. So, if your average drawable is smaller than that, you may hit the number cap before the size cap.

Geobits
  • 22,218
  • 6
  • 59
  • 103