开发者

How to know db size at runtime

开发者 https://www.devze.com 2023-01-24 14:02 出处:网络
i\'m trying to know the database space available. In J2ME you have getSizeAvailable(), but there is no direct replacement in Android, so i thou开发者_C百科ght about doing getMaximumSize() minus databa

i'm trying to know the database space available. In J2ME you have getSizeAvailable(), but there is no direct replacement in Android, so i thou开发者_C百科ght about doing getMaximumSize() minus database size, the thing is i just can't find a way to know the db actual size, at runtime.

Thanks!


Use android.os.StatFS to find the available space. Here is some sample code that demonstrates its use.

0

精彩评论

暂无评论...
验证码 换一张
取 消