2

I'm trying to create a simple database program for Android so I decided to check the file limit by using database.getMaximumSize() and it returns a huge number of bytes which, converted, result in 1 terabyte.

Assuming that someone actually has 1 TB of space on a current phone (just roll with it) would a database that big really be possible on a portable (Android) device or is this getMaximumSize() method return something different than what I'm thinking?

I'm asking this because if the getMaximumSize() doesn't return the actual maximum size, and the size is much smaller like 1 mb or so, I would have to put restrictions on my app so users don't go over the limit and end up with force closes or something.

Mat
  • 202,337
  • 40
  • 393
  • 406
ZimZim
  • 3,291
  • 10
  • 49
  • 67

1 Answers1

0

I would expect the maximum database size to be limited by the amount of free space you have on your SD card. Here's how to find that out.

If you want to limit your users further, I suggest you limit them by number of records of a main table and not file size - it will make more sense to them and to your application.

Community
  • 1
  • 1
zmbq
  • 38,013
  • 14
  • 101
  • 171