How to get the current sqlite database size or package size in Android?

前端 未结 4 1247
别跟我提以往
别跟我提以往 2020-12-10 03:50

I can\'t get the total amount of data used by an Android Application (or package), because the official API support has been deleted:

http://groups.google.com/group/

4条回答
  •  忘掉有多难
    2020-12-10 04:30

    You can use this raw query as well, on sqlite 3.16.0+:

    SELECT page_count * page_size as size FROM pragma_page_count(), pragma_page_size();
    

    It returns the "size" column with the single row.

提交回复
热议问题