Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

أين نقلت الملفات غير الصوتية #2986

Open
KhaledKhaled0909 opened this issue Dec 2, 2024 · 17 comments
Open

أين نقلت الملفات غير الصوتية #2986

KhaledKhaled0909 opened this issue Dec 2, 2024 · 17 comments

Comments

@KhaledKhaled0909
Copy link

لا أجد ملفات التطبيق في أي مكان ولا تقل لي إنها نقلت إلى user folder الذي لا يمكن الوصول له بدون روت!

@ahmedre
Copy link
Contributor

ahmedre commented Dec 2, 2024

نعم - هذا صحيح. الإصدارات الجديدة من أندرويد تمنع إستخدام الأماكن على الذاكرة الخارجية إلى في أماكن محددة.
يمكنكم التحكم في ملفات الصوت من الإعدادات المتقدمة.

(answering in English for the benefit of those who speak English)
since Android version 29, Google has been moving developers to use scoped storage since the existing storage system usage was a privacy concern, allowing apps to scrape data from devices, fingerprint customers, take their photos, and so on.

consequently, the default storage location for the app became internal storage. we do understand that many people want to use the audio files outside of the application, and, as thus, there's an option for moving the audio files into the allowed app specific folder in external storage (typically /Android/data/com.quran.labs.androidquran/files). typically, these get removed when the app is uninstalled.

جزاكم الله خيراً

@KhaledKhaled0909
Copy link
Author

أفهم ذلك ولكن هذا سيمنع من إرسال الملفات الخاصة بالصفح والتفسير والترجمة إلى أجهزة أخرى وسأضطر لتحميلها باستخدام الإنترنت لكن هذه أحجام صغيرة جيد أن ملفات الصوت بقيت بالخارج لأن أحجامها كبيرة جدا شكرًا لذلك.
هناك أمر أخر الآن لا أستطيع مسح الطبعات المختلفة إلا من خلال مسح التطبيق تمامًا عكس الترجمات والتفسيرات يمكن مسحها من خلال التطبيق لذلك أرجو إضافة خيار لمسحها
وأيضا أرجو دمج طبعة واحدة على الأقل مع ملف التطبيق الApk لكي يسهل الإرسال بين الأجهزة وشكرًا.

@AlbahrawyTiger
Copy link

@ahmedre Why is the database location not also in /Android/data/com.quran.labs.androidquran/files

@ahmedre
Copy link
Contributor

ahmedre commented Dec 3, 2024

@KhaledKhaled0909
جزاكم الله خيراً
إن شاء الله نضيف إمكانية محو أنواع الصفحات - كنت أريدها لهذا الإصدار لكن إن شاء الله قريباً.
بالنسبة للطبعة مع التطبيق هيا فكرة جيدة - لكن عيبها حجم تنزيل البرنامج الأول، بالأكثر لو أراد المستخدم إختيار مصحف أخر.

(in English)

  • completely agree about this (the ability to remove installed page types) - and want this functionality in sha' Allah - will try to prioritize it soon. the tricky part is some of the older page types used different path names, and some files are shared between all the page types, so need to be careful when implementing to not accidentally delete files that we shouldn't delete.
  • with respect to the idea of bundling the pages - it's a great idea, and one we've done in the past for the other masa7if even (Naskh, Qaloon, Warsh) for some periods of time. It does have downsides, however - if you download the app and use a different mus7af, you can't erase the copy that was downloaded with the apk. if you use the bundled mus7af, we pay 2x for the storage of that mus7af since we copy the assets from the apk onto the filesystem for easier use of them. so there are tradeoffs (plus the initial download size being larger). will think about this though because it does solve a lot of other problems (the app is ready to use upon downloading, there is little chance of corrupted downloads, etc).

@ahmedre
Copy link
Contributor

ahmedre commented Dec 3, 2024

@AlbahrawyTiger it used to be historically as part of the original "everything lives in /sdcard/quran_android" approach. This got migrated to "everything lives in /Android/data/com.quran.labs.androidquran.data" in previous releases.

in this release, however, it seemed the right time to keep these databases and page types internal for a few reasons:

  • they're an internal implementation detail of the app
  • they're not useful to most non-developers
  • they're not useful outside of Quran for Android (minus cases of developers)
  • developers who want these should get them the recommended ways (ex Quran.com APIs, etc) to ensure they can get updates for translations and so on, rather than a one time copy from a download from an app installation.

@KhaledKhaled0909
Copy link
Author

@ahmedre
معك حق لم أفكر في الأمر من نواحي عدة مثلكم
كل تفكيري أني أريد عندما أرسل التطبيق لصديق أن يعمل بدون الحاجة لإنترنت والذي غالبا لا يكون متوفر خارج المنزل فكنت أنقل له ملفات الصفح والتفسير والصوت مع الapk الخاص بالتطبيق وأقوم بتثبيته ونقل الملفات لمسارها في android/data/ملف التطبيق ولهذا عندنا تم نقلهم اقترحت دمج طبعة على الأقل في ملف الapk لأني لن أكون قادرًا على نقلهم يدويا بعد الآن لكن بالطبع سيزيد هذا حجم الapk بشكل كبير ولن يتم حذف الطبعة المدمجة لكن لكي شيء مزايا وعيوب وأنا مع الحل الذي اقترحته دمج طبعة مع الapk ليسهل عملية الإرسال للأصدقاء وأقترح أن تكون الطبعة المخصصة للشاشات الطويلة الزرقاء لأنها منتشرة الآن في التطبيقات الأخرى كطبعة أساسية مثل تطبيق ayah و golden quran بعد تغيير أبعاد الهواتف من 2017 للآن وشكرًا.

@MahmoudMabrok
Copy link
Contributor

@ahmedre هل ممكن نعمل workflow
يطلع تطبيق معه نسخه مدمجه من طبعة القرآن ليسهل تداولها.

وايضا هذه الأيام الهواتف تاني بذاكره كبيره نسبيا فلم بعد حجم التطبيق عائق.

@ahmedre
Copy link
Contributor

ahmedre commented Dec 13, 2024

وعليكم السلام ورحمة الله وبركاته
يحتاج بعض العمل لكن إن شاء الله

@AlbahrawyTiger
Copy link

"everything lives in /Android/data/com.quran.labs.androidquran.data" in previous releases.

@ahmedre Can this be kept original for the entire database, it is a good option for those who have not rooted their device to access the database in Android/data
وجزاكم الله خيرا وبارك عليكم

@ahmedre
Copy link
Contributor

ahmedre commented Dec 16, 2024

Here are my thoughts on this - the intention is to keep files people might need to use outside of the app (mp3s which are playable in mp3 players outside of the Qur'an app) in a place accessible on external storage (Android/data). The databases and pages are an implementation detail of the app and. aren't usable outside of the app, so they make sense on internal storage.

The only usage of the database and pages are someone building their own app, and this is not how I want to give the data to them - people taking the data from the application's files and putting them in another app lose updates and fixes and the ability to remove problematic translations, etc. There are better ways to provide this data to app developers (ex the Quran.com api, etc).

I think Khaled's use case of "giving an entire ready to use app to a friend," while great, is a rare case (and, even if so, we can fix most of this problem by bundling the pages with the app in the future in sha' Allah). That just leaves the databases for translations then. I am curious as to what the use case is that makes these files (which are an implementation detail) needed.

@AlbahrawyTiger
Copy link

AlbahrawyTiger commented Dec 17, 2024

I am curious as to what the use case is that makes these files (which are an implementation detail) needed.

@ahmedre I am not a developer, I have my own use cases that I mention, for example: I want to copy verses of the Qur’an with the orthography (الإملائي) Imlaei (Simple), so I replace the quran.ar.uthmani.v2.db base with a base that has the Qur’an in the text Imlaei (Simple) (الإملائي), and I have an example Another: I am moving some translation rules to another application folder that uses the same Quran Android database system.
If it is possible to return it again in the following versions, fortunately for me (الحمد لله), with the latest update, the quran.ar.uthmani.v2.db file was moved internally and it is modified on Imlaei (Simple)
جزاك الله خيرا أخي أحمد وبارك الله عليك وعلى ذريّتك

On the occasion of our brother Khaled’s suggestion, I suggest including the textual presentation of the Quran (With text wrapping system) Instead of Quran images, this text display system can provide initial application launch and Quran reading without having to download Quran images (for those who want) and also not increase the apk size.

Greentech Apps Foundation has implemented this beautifully but it is not open source.
https://gtaf.org/apps/quran/
https://play.google.com/store/apps/details?id=com.greentech.quran

Also our brother irfan implements a text wrapping system for the Qur’an, which is open source, but does not support audio. https://play.google.com/store/apps/details?id=com.mirfatif.noorulhuda https://github.com/mirfatif/NoorUlHuda

Related Issue I opened
#1966

جزى الله خيرا كل من ساهم وبارك عليهم

@KhaledKhaled0909
Copy link
Author

@AlbahrawyTiger
@ahmedre
Screenshot_20241217-210947_WhatsApp.jpg

I tried copying the same verse from the two apps the quran for android app here the text does not look correct like the نور هدى app you mentioned which was the resson that devolpers here change the font of the tafsir section from the device font to a unified font but the problem still there when you copy any verse from the app and paste it on any where else.

@AlbahrawyTiger
Copy link

@KhaledKhaled0909 المشكلة في خط الهاتف لديك، عليك تغييره
قرآن أندرويد يستخدم الرسم العثماني في نسخ نص الآيات وهذا لا تدعمه معظم الخطوط بشكل صحيح
أمَّا نور الهدى فيستخدم الرسم الإملائي بشكل إفتراضي ولديه أيضا الرسم العثماني (البسيط) في قائمة texts
لكن نور الهدى ينقصه نسخ آيات متعددة الميزة التي يتمتع بها قرآن أندرويد

@KhaledKhaled0909
Copy link
Author

@AlbahrawyTiger
كل الخطوط في الجهاز نفس المشكلة

@ahmedre
Copy link
Contributor

ahmedre commented Dec 19, 2024

I want to copy verses of the Qur’an with the orthography (الإملائي) Imlaei (Simple), so I replace the quran.ar.uthmani.v2.db base with a base that has the Qur’an in the text Imlaei (Simple) (الإملائي), and I have an example Another: I am moving some translation rules to another application folder that uses the same Quran Android database system.

The first one at least is a good candidate for a feature built into the app - i.e. share uthmani text or imlaei text. At the same time, I think we used to have this option long ago and removed it because we got a lot of complaints that "the Qur'an should only be written in Uthmani text and it's wrong to share it in Imlaei text" - but not sure, can double check this with a sheikh and ask. We just got a request for it in #3028 the other day also.

On the occasion of our brother Khaled’s suggestion, I suggest including the textual presentation of the Quran (With text wrapping system) Instead of Quran images, this text display system can provide initial application launch and Quran reading without having to download Quran images (for those who want) and also not increase the apk size.

This was a long discussion many times in the past - it's a good idea, but has some drawbacks that make things difficult. First and foremost, getting things correct on all devices was a very difficult task in earlier days of Android, where some device overwrite whatever font settings are put, etc. Until recently, I've seen glitches on Tarteel (which does use fonts also) during the beta days of Android 15, and saw a good number of "Quran.com misrenders the text on Safari" issues on the bug tracker and Discord. Images are much safer for that reason.

Some more reasons:

  • not all pages have fonts to help us render the exact same way as the madani mushaf today (ex tajweed mushaf, shemerly, warsh, qaloon, etc).
  • by using line by line images, we can solve the problem of not filling the entire screen.
  • bandwidth has become cheaper and the ability to download 100mb of pages once to use an app is reasonable - app sizes on iOS for even simple apps are in the hundreds of megabytes.

All and all, it's a valid idea but I avoided this to avoid the maintenance costs of people with rendering issues.

I tried copying the same verse from the two apps the quran for android app here the text does not look correct

I think (I might be remembering wrong can double check) that we actually have 2 "flavors" of the uthmani text - that which we show in the app (full text with everything) and the "minimal version" that we use for sharing (much less tashkeel, etc). we can't control how apps outside of ours render things so that makes it tricky to fix this type of thing, and many of the pre-installed system fonts don't support the complex characters used in uthmani rendering.

@KhaledKhaled0909
Copy link
Author

@ahmedre
Yesterday an idea cames to my mind about the data of the app, see in this screenshot it is samsung smart switch app that send apps from phone to another and it works on any android not just samsung and many apps supports to send it with it's data and your app does indeed but I think with size of 1 mb it is the bookmarks only and the app does have this feature already so what about support all the data from pages to tafsir to translations etc and that will help move the app and the data still in the user folder like you want.
I don't know is that possible or not but it cames to my mind🤔
Screenshot_20241220-034450_Smart Switch.jpg

@MahmoudMabrok
Copy link
Contributor

@ahmedre Yesterday an idea cames to my mind about the data of the app, see in this screenshot it is samsung smart switch app that send apps from phone to another and it works on any android not just samsung and many apps supports to send it with it's data and your app does indeed but I think with size of 1 mb it is the bookmarks only and the app does have this feature already so what about support all the data from pages to tafsir to translations etc and that will help move the app and the data still in the user folder like you want. I don't know is that possible or not but it cames to my mind🤔 Screenshot_20241220-034450_Smart Switch.jpg

I think data here represent public data of app that other apps can read, in our case still we store them internally so no other app can read, so this share app won't able to share app with data.

Am I right @ahmedre

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants