Why does the SQLiteDatabase's getMaximumSize() method return 1 TB?

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.


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.

Need Your Help

INSERT only if both colomns are not duplicate

php mysql

DELETE FROM RelationsAuthors WHERE MainId = :MainId AND AuthorId NOT IN (:authorarray)

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.