quran / quran_android

a quran reading application for android
http://android.quran.com
GNU General Public License v3.0
1.99k stars 881 forks source link

Translations and Downloaded Audio deletes on Samsung Device Care Optimization #1145

Open iamtahirk opened 5 years ago

iamtahirk commented 5 years ago

I'm using Galaxy S8+ and whenever my app gets updated it also deletes previously downloaded translations and gapless quran audio files. I had to download these on every update. I'm using Quran - Naskh (indo-pak Quran)

ahmedre commented 5 years ago

salam 3alaikum, jazakAllah khairan - i have had a lot of reports about this and i still have no idea why it happens - if you can help me figure it out then really jazakAllah khairan because this has been causing a lot of people trouble for a long while now and it'd be amazing if you can help me figure out why!

questions:

and i am guessing you don't have a cache cleaning app or anything, right? jazakAllah khairan! walsalam 3alaikum.

iamtahirk commented 5 years ago

Wa'alaykumsalam,

Not 100% sure as I didn't checked it like that. I only notice when I try to play but it starts downloading. I'll try to check this out once it gets updated.

ahmedre commented 5 years ago

may you try to fake it by downloading the older version from the releases page on github here (https://github.com/quran/quran_android/releases) and then updating from the Play Store that way?

iamtahirk commented 5 years ago

It solves the issue. Completely uninstalled the app. Removed the folders. Downloaded and installed older version 2.9.2. Downloaded Pages, Audio files and translations.

Updated the app and it works absolutely fine. Everything stays the same. Nothing gets deleted.

Thanks a lot for your help.

ahmedre commented 5 years ago

sub7anAllah - i am surprised it fixed the issue - i think there's a bug and i really hope to be able to figure it out in the near future in sha' Allah, but khair. jazakAllah khairan for trying, please let me know if you see it again.

iamtahirk commented 5 years ago

I will.

iamtahirk commented 5 years ago

It happened again. The folder does remains and the Quran pages are also not effected. Only downloaded audio and downloaded translations got deleted.

ahmedre commented 5 years ago

do you have any cache cleaning apps or any cleaner apps that might have deleted the files? did you give permission to the app when starting up?

it's really odd that only audio and translations get deleted and not pages when all are in the same base folder!

iamtahirk commented 5 years ago

Nothing of that sort at all and it has all the permissions.

ahmedre commented 5 years ago

so you started the app, it didn't ask you for pages, but the audio was gone? do you know that the audio wasn't moved anywhere else? the app doesn't have any logic to delete audio at all right now so this is quite surprising - so you see /sdcard/quran_android there, the pages directory (width_1260 or what not) is there, but audio is not there or is there but empty?

iamtahirk commented 5 years ago

Figured it out. This is happening all due to the Galaxy S8's Device Care.

I already have a backup for the folder so I had replaced it earlier. Now after your comment about cache cleaning just tried the device care again and it did deleted the same files. https://www.theandroidsoul.com/wp-content/uploads/2019/01/Device-Care-Battery.jpg

Is there a way to skip these files from being deleted?

ahmedre commented 5 years ago

hmm, i really don't know. it's strange that it would delete the mp3s specifically and leave the pages, there's really not much logic to why it would do that 🤔

iamtahirk commented 5 years ago

The device care didn't delete any other apps data.

It only leaves the Naskh folder intact which has width_1152 & Databases folder with corresponding undeleted files.