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

前端 未结 4 1242
别跟我提以往
别跟我提以往 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:34

    You can query the database with these two:

    pragma page_size;
    pragma page_count;
    

    (see the sqlite pragma docs).

    Multiply the first by the second and you'll get total pages used.

提交回复
热议问题