kiwix / kiwix-android

Kiwix for Android
https://android.kiwix.org
GNU General Public License v3.0
899 stars 450 forks source link

Remove full scanning feature #4011

Open kelson42 opened 1 month ago

kelson42 commented 1 month ago

We have a partial filesystem scanning feature to detect ZIM files (without having to sideload them manually):

Asking myself if we should not simply remove it.

kelson42 commented 1 month ago

@MohitMaliFtechiz Two questions:

MohitMaliFtechiz commented 1 month ago

This feature works for non-PS only versions of Kiwix-Android

@kelson42 Right it works for non-PS only(for loading the sideloaded zim files). But this also works in the PS variant(If the user directly puts the ZIM file in the app-specific directory(internal or public)).

This is a resource intensive process running in background

True.

This does not run on the whole fs anymore Which parts of the fs are exactly scanned?

In the non-PS version the scanning does not work in the Android/data, and Android/obb folders as they are restricted folders. Apart from these folders, the scanning is working on the full file system.

Has been conceived at a time there was no way to sideload manually a ZIM file

It was introduced very long ago, and at that time, we do not have the file picker functionality(Especially for Android 11 and above, which now directly adds the ZIM file to the local library screen after picking).

How often takes runs this process (what triggers it)?

This scanning process only runs once when the user wants to scan the storage for ZIM files(It triggers when the user swipes down to refresh on the local library screen).

What kind of impact would that have (beside having to sideload manually any ZIM file downloaded outside Kiwix)?

The main impact is that we can not automatically load the sideloaded zim files, we have to manually load the ZIM files via "+" icon in the application. Also, if we remove the scanning from the application user has to manually load the ZIM files one by one in the application(Scanning automatically adds the whole ZIM files at once in the application).

The second impact will be for Samsung's users who are using the "My Files" device explorer since we can not open the ZIM files directly from the "My Files"(https://github.com/kiwix/kiwix-android/issues/4002), so in this case, this scanning feature will help users to load sideloaded ZIM files in the application. We can not rely on the file-picking functionality for non-PS variants since manufacturers can change the returning URI type like we have faced in the Samsung tablet in https://github.com/kiwix/kiwix-android/pull/4015.

Apart from this, there are no other impacts we will face. Since downloaded ZIM files(within the application) are directly showing in the application.