Page MenuHomePhabricator

Show amount of storage used by Wikipedia app and compilations to users
Closed, ResolvedPublic

Description

User story

As a user, I want to know the size of the compilations in relation to my other apps and total available space so I can manage my device storage.

Proposed solution

Elements to show in the UI:

  • size of Wikipedia app (size of app, offline compilations, reading lists, etc)
  • size of all other apps on the device
  • Total available device space

Event Timeline

RHo updated the task description. (Show Details)

If there's a simple API to get the amount of space the app is using, it'd be simple. It'd be more difficult if it required new permissions.

Estimate on the assumption that the API is simple.

The storage information elements appear to all be shown on the UI, but do not match up with the storage space as shown in the device settings:

Storage usage info in Wikipedia app
main-MainActivity-08112017145931.png (1×1 px, 169 KB)
Device settings total storage info
settings-Settings-08112017145953.png (1×1 px, 90 KB)
Device settings Wikipedia app storage info
settings-Settings-08112017150036.png (1×1 px, 89 KB)

It seems like the inconsistency may be partly due to the figure shown for space taken up by Wikipedia in the Offline compilations screen only calculating the space taken by offline compilations, and is not adding the space taken up reading lists and the app itself.

QA steps to test

Note: Testing encompasses both (A) Inclusion of all storage info elements detailed in the task description; as well as (B) accuracy of those figures.

  1. Open the offline library (aka Offline Compilations) from the overflow menu on the Explore feed
  2. It is expected that the storage info shown should reflect what is detailed in the task description, namely (i) size of Wikipedia app (size of app, offline compilations, reading lists, etc); (ii) size of all other apps on the device; (iii) Total available device space
  3. Go to device Settings > Storage & USB and check that the free space and space taken by the Wikipedia app (app+data) matches what was shown in step 2.

@RHo Android does not provide an API for an app to determine the size of itself on disk. This is consistent with the Google Play Music app, which reports "0 MB used by Play Music" when nothing is downloaded, even though the app itself is ~50MB.

Therefore, we can either:
a) Amend our disk-usage screen to say "used by Offline Library" instead of "used by Wikipedia"
b) Break off a longer-term task to get the real disk usage by using a hack or workaround.

@Dbrant - fair enough for not being able to include the actual app size, but wanted to clarify – is it currently including the space taken up by reading lists and other cached pages? Google Play Music does include cached data as well as downloaded files in the storage space info in their "Manage downloads" section, but it's probably a good practice to follow.

Re-opening as still need update to text string and new task for longer-term fix per comment:

@RHo Android does not provide an API for an app to determine the size of itself on disk. This is consistent with the Google Play Music app, which reports "0 MB used by Play Music" when nothing is downloaded, even though the app itself is ~50MB.

Therefore, we can either:
a) Amend our disk-usage screen to say "used by Offline Library" instead of "used by Wikipedia"
b) Break off a longer-term task to get the real disk usage by using a hack or workaround.

Created T177654 to account for item (b)