meypod / al-azan

Privacy focused ad-free open-source muslim Adhan (islamic prayer times) and qibla app
https://meypod.github.io/al-azan/
GNU Affero General Public License v3.0
164 stars 23 forks source link

Add more calculation methods #66

Open TorCzaf opened 1 year ago

TorCzaf commented 1 year ago

Hi , can you please add more calculation methods like: -Ministry of religious affairs - Tunisia -Ministry of Islamic affairs - Morocco -Ministry of religious affairs and wakfs - Algeria -London unified prayer times -Jabatan kemajuan Islam - Malaysia -Mosquee de Paris - France -Angle 18° France -Angle 15° France

And maybe there is more.

====

And also it would be good to add a button to share the app via Bluetooth in case if the sender and the receiver both have no WiFi/internet. I took this idea from F-droid store itself. This could be useful for people who travel in desert or in unknown places or be in unpopular areas...ETC

meypod commented 1 year ago

Hi

-Ministry of religious affairs - Tunisia -Ministry of Islamic affairs - Morocco -Ministry of religious affairs and wakfs - Algeria -London unified prayer times -Jabatan kemajuan Islam - Malaysia -Mosquee de Paris - France -Angle 18° France -Angle 15° France

Can you provide link to the official page of these methods ? so I can take their exact parameters ? We can also add a "Custom" method which will allow users to enter their own angles

And also it would be good to add a button to share the app via Bluetooth in case if the sender and the receiver both have no WiFi/internet.

Some android manufactures already have this feature built-in to the OS some of file managers do as well if you have the file, all new android OS (Android 6+) also have the "Nearby Share" feature which allows you to send files without internet using WiFi or bluetooth to any device near you that also has the feature.

TorCzaf commented 1 year ago

Can you provide link to the official page of these methods ? so I can take their exact parameters ? We can also add a "Custom" method which will allow users to enter their own angles

I will see how or where to get these links or parameters.... Yes good idea to provide a custom method for entering angles

Some android manufactures already have this feature built-in to the OS some of file managers do as well if you have the file, all new android OS (Android 6+) also have the "Nearby Share" feature which allows you to send files without internet using WiFi or bluetooth to any device near you that also has the feature.

Yes I just found out that Google play has nearby share but they collect data that is not good for privacy, plus Google play nearby share doesn't share apps from F-droid, I only found the apps that I downloaded from google play.

There is also nearby share in the phone settings that also collects data plus it may not work for all regions https://support.google.com/files/answer/10514188?hl=en#zippy=%2Chow-nearby-share-handles-your-data

I think it is better to make and put a nearby share feature into your app :) (just for sharing your app offline) just like F-droid did, you can have a look at their source code and see how they did it in case you need to.... it would be really good idea.

if you have the file

You mean APK?

I meant sharing the app itself in case the sender doesn't have the APK file

meypod commented 1 year ago

You mean APK?

yeah I meant APK

I prefer to let third party apps handle it. I'm pretty sure there's a lot of apps you can use to get the APK file. check this app for example, I just found it: https://f-droid.org/en/packages/be.brunoparmentier.apkshare/ it works just as you want it to, plus you can also share other apps as well :)

TorCzaf commented 1 year ago

I prefer to let third party apps handle it

OK :)

check this app for example, I just found it: https://f-droid.org/en/packages/be.brunoparmentier.apkshare/ it works just as you want it to, plus you can also share other apps as well :)

Very good app thank you very much :)

AI-IMED commented 1 year ago

Hi @meypod Many Twelver Muslims in various countries of the world, as well as many applications, rely on (Astronomical Research Center) to know the prayer times

I wonder, can you add this method of calculation to this great application?

https://english.nojumi.org/prayertimes

meypod commented 1 year ago

Hi @AI-IMED , The link you have given does not mention any angles that is used for calculation of the prayer times since the app calculates everything offline, we need the angles and methods used by them

have you tried the "Shia Ithna Ashari, Leva Institute, Qum" or "Shia, Institute of Geophysics, University of Tehran" method to see how it compares ?

AI-IMED commented 1 year ago

The link you have given does not mention any angles that is used for calculation of the prayer times since the app calculates everything offline, we need the angles and methods used by them

It saddened me , I depend on it because it gives very accurate prayer times.

have you tried the "Shia Ithna Ashari, Leva Institute, Qum" or "Shia, Institute of Geophysics, University of Tehran" method to see how it compares ?

Yes, I tested that, it is not accurate, I have to adjust the prayer times, but even with adjusting the times, after two months or more, it makes a difference in the prayer times again

meypod commented 1 year ago

I'm sorry but without knowing the exact details of their calculation there's not much I can do

Yes, I tested that, it is not accurate, I have to adjust the prayer times, but even with adjusting the times, after two months or more, it makes a difference in the prayer times again

Make sure to try changing the advanced settings in the calculation settings, if the calculated time is close, one of those may help adjust your time correctly

AI-IMED commented 1 year ago

I forgot to mention, It is necessary to add midnight to the calculation adjustment options, because there is a difference of opinion among the jurists of the Twelver doctrine, some of whom believe that the time of midnight is between sunset and dawn, and some of them believe that it is between sunset and sunrise

meypod commented 1 year ago

I use https://github.com/batoulapps/adhan-js library, I wanted to add adjustments for the midnight time, but it is provided by the library, and it doesn't provide a way to adjust it

please create an issue there, if it gets added there, I can add it as well

meypod commented 1 year ago

Yes, I tested that, it is not accurate, I have to adjust the prayer times, but even with adjusting the times, after two months or more, it makes a difference in the prayer times again

"Shia, Institute of Geophysics, University of Tehran" method seems to match the times provided by the website you mentioned with only around 1 minute of difference which is usually due to rounding

AI-IMED commented 1 year ago

Yes, indeed, the difference is 1 minute, this calculation method seems better.

TorCzaf commented 1 year ago

Hi @meypod I got these links by myself, some by searching in Google and some from Wikipedia

https://www.londonprayertimes.com/ London - From google

https://www.e-solat.gov.my/ Malaysia  - From google

https://www.grandemosqueedeparis.fr/horaire-des-prieres-paris Grand Mosque de Paris - From google As for France Angle 15° and Angle 18°, I don't know From where to get those


Now these 3 websites below are in Arabic if you don't understand arabic, please tell me and I will help you in-shaa-Allah

http://www.affaires-religieuses.tn/public/ar Tunisia - From Wikipedia

https://www.marw.dz/%D9%85%D9%82%D8%A7%D9%84%D8%A7%D8%AA-%D9%88%D8%AF%D8%B1%D8%A7%D8%B3%D8%A7%D8%AA/%D9%85%D9%88%D8%A7%D9%82%D9%8A%D8%AA-%D8%A7%D9%84%D8%B5%D9%84%D8%A7%D8%A9 Algeria - From Wikipedia

https://www.habous.gov.ma/prieres/index.php Morocoo  - From Wikipedia

Or you can have a look at the source code of the app which I got calculation methods names from and search for links and parameters used in it https://github.com/Five-Prayers/five-prayers-android I have also created issue in there and waiting for the reply.

meypod commented 1 year ago

Well that would make it a lot easier, they got all the parameters it seems the only issue is how credible they are (have you tried comparing times ?)

for example https://www.londonprayertimes.com/ takes time from https://www.eastlondonmosque.org.uk/prayer-times-and-calendar-explained which are based on time from http://astro.ukho.gov.uk/psp/index_beta.html which I can't find the calculation parameters from

TorCzaf commented 1 year ago

the only issue is how credible they are (have you tried comparing times ?)

You mean comparing times in the app I mentioned with those in the links?

No, I haven't.

OK I will do it.

TorCzaf commented 1 year ago

Also Speaking of calculations, can you also make the app to do online calculation and not only offline calculation if possible?

TorCzaf commented 1 year ago

OK I will do it.

Ah yes I forgot...I will have to change phone timezone for that..

Do you want me to compare times in the links with those in Google search? Or what? :)

meypod commented 1 year ago

Also Speaking of calculations, can you also make the app to do online calculation and not only offline calculation if possible?

Not really, I try to keep app offline as much as possible (making things online make app more complex and prone to errors)

compare times with the official links with the times of the same method in five prayers app

TorCzaf commented 1 year ago

Not really, I try to keep app offline as much as possible (making things online make app more complex and prone to errors)

At least not that kind of errors that may affect app installation am I right? Or you mean errors that may affect offline mode and everything in the app?

I agree with you to make most of the app in offline mode I mean it seems that your idea is to make a small sized offline adhan app .. right? So what about making a section in the app and name it for example "online mode" and in this section you put everything related to online mode plus you can put a warning message to notify users that online mode may cause or have errors.

If you think online mode will increase the app's size then how about you clone this app and that new clone should have extra features like online mode ?

I mean at the end you should have 2 apps one small sized and offline and one with extra features and it may become big in size and you can name it for example "Al-Azan-Extra features" Or instead of cloning the app you can make extension/add-on for it and that add-on should have these extra features like online mode, local masjid pray times or maybe other features you like...

compare times with the official links with the times of the same method in five prayers app

As you command :)

meypod commented 1 year ago

As you command :)

sorry, I didn't mean it like that

At least not that kind of errors that may affect app installation am I right? Or you mean errors that may affect offline mode and everything in the app?

online, means it requires a network connection, and a backend many things can go wrong, handling states between disconnections adds some complexity and unreliability, API may go down, it may become paid, etc

though one of the reasons is that in future if I manage to do something about Qibla map feature, I may remove internet permission from app to make it completely offline, which is better for privacy

There are other apps with mosques time like https://github.com/mawaqit/android-tv-app , And online apps like https://github.com/metinkale38/prayer-times-android

TorCzaf commented 1 year ago

sorry, I didn't mean it like that

No brother :) .. when I said that, I meant like "I will do it with pleasure" .. Or "Just tell me anything you want and In-sha-Allah I may do it". I know you didn't mean anything. There is no need to apologize. :)

online, means it requires a network connection, and a backend many things can go wrong, handling states between disconnections adds some complexity and unreliability, API may go down, it may become paid, etc

Aha I see now the big picture. Thanks for clarifying. I wish if I could provide you any help but I am a normal person....Thank You again.

though one of the reasons is that in future if I manage to do something about Qibla map feature, I may remove internet permission from app to make it completely offline, which is better for privacy

Hmm..indeed..yes

There are other apps with mosques time like https://github.com/mawaqit/android-tv-app , And online apps like https://github.com/metinkale38/prayer-times-android

Thank you for your great suggestions.

AI-IMED commented 12 months ago

We can also add a "Custom" method which will allow users to enter their own angles

The feature of entering custom angles looks interesting, I'm eagerly awaiting the feature to try it, because I do not know my angle accurately, and to see if it will contribute to adjusting the accuracy of the calculations that I need.

meypod commented 12 months ago

methods other than Algeria and Unified London don't match exactly with their official websites when checked inside the five prayers app

TorCzaf commented 12 months ago

I was planning to do it for you soon but it is just I am busy these days ... militry-related things and others... but I I am glad you did it, you are now certain what is reliable and what isn't reliable.

TorCzaf commented 12 months ago

And what is the solution now? Will you put your own parameters based on the official links I sent you? Or what? I mean will you make parameters?

Also the app you mentioned https://github.com/metinkale38/prayer-times-android has other calculation methods like IGMG.org ... this one has German prayer times I don't know the other two NamazVakti.com Semerkandtakvimi.com

meypod commented 12 months ago

Will add Algeria method as that's the only matching one

Unified London is for East London mosque and they use moonsighting committee method adjusted to their location so probably not going to add that For morocco, tunisia and malaysiya will later research and try to find what parameters they use exactly

TorCzaf commented 12 months ago

Will add Algeria method as that's the only matching one

That is great news. By the way I thought Algeria is hard to be added because I didn't see any automatic timer/hour I mean it is just a PDF file on their religious ministry website.

Good luck with the rest of the countries.

TorCzaf commented 12 months ago

Muslim Pro also has other calculation methods

https://www.muslimpro.com/Prayer-times-Germany-DE#

-Federation of Islamic Associations in Basque Country -Fixed Isha Angle Interval -UAE General Authority of Islamic Affairs And Endowments -Islamic Centre Aachen this is probably for germany -Egyptian General Authority (Bis) I don't know what does "Bis" mean -MUIS (Majlis Ugama Islam Singapura) or maybe that is the one in your app As "Singapore"

And this one below has some angles for some calculation methods like Fixed Isha and EgyptBis https://support.muslimpro.com/hc/en-us/articles/202886274

### but be careful when using Muslim Pro, it is accused of selling users data to US militry

Also I found this I don't know how to explain it but it seems it has lots of functions so I will just leave it here in case you find it useful https://pkg.go.dev/github.com/RadhiFadlillah/go-prayer By the way it has angles for Malaysia

TorCzaf commented 11 months ago

Hi Here are some official links

UAE General Authority of Islamic Affairs And Endowments https://www.awqaf.gov.ae/en Maybe you already have this one as "The Gulf Region (Dubai)"

Islamic Centre Aachen https://app.izaachen.de/

Federation of Islamic Associations of New Zealand https://fianz.com/prayer-times/

Religious administration of Muslims of ukraine https://umma.in.ua/en/node/1692

Kementrian Hal Ehwal Ugama (Brunei Darussalam) https://www.mora.gov.bn/Theme/Home.aspx

Union de comunidades Islamicas de Valencia http://www.ucidvalencia.org/tiempos_de_oracion.html I don't know whether it is for all cities in Spain or only Valencia city

Islamske zajednice u Bosni i Hercegovini. (Bosnia and Herzegovina) https://www.islamskazajednica.ba/ I think they use prayer times from https://vaktija.ba/ And here is the source code https://github.com/vaktija

Islamske skupnostti v Republiki sloveniji (Slovenia) https://www.islamska-skupnost.si/ They use https://www.vaktija.si/

These 3 below I can't find prayer times on their websites, but I may send them emails and see if I can get prayer times

Muslim league in poland https://www.islam.info.pl/

All Ceylon Jamiyyathul Ulama (sri lanka) https://acju.lk/en

central islamic council of thailand https://www.cicot.or.th/en

TorCzaf commented 11 months ago

Here is official response from https://acju.lk/en regarding prayer timetable for sri lanka Screenshot_20230720-121308_Tutanota

And here is Prayer Timetable with Angles in the PDF file that they sent

Salah Time Table.pdf

TorCzaf commented 11 months ago

Here is official response from Union of Islamic Communities of Spain https://ucide.org/ regarding prayer times for Spain cities Screenshot_20230721-150131_Tutanota

And this is their message so it can be translated

Assalamu ąlaikum, Sobre horarios de oración y fiqh podéis leer desde el enlace: http://www.hispanomuslim.es/panya/azala.htm. Os deseamos lo mejor, un afectuoso saludo, mą assalama,

Documentación Observatorio Andalusí Unión de Comunidades Islámicas de España C/ Anastasio Herrero 5; 28020 Madrid tel:+34915708889; tel:+34915714040 observatorio@ucide.org ucide.org/

And here is the website that they mentioned in the message http://www.hispanomuslim.es/panya/azala.htm it has Prayer Times for Spainian cities with coordinates and also has other things. You may need "google translate" to translate the website


I asked them for English version for the website but they said only Spanish version is available

Assalamu ąlaikum, Disponible solo en español; pero puedes usar la herramienta google: https://translate.google.com/?sl=es&tl=en&op=websites. Un afectuoso saludo, mą assalama,

meypod commented 11 months ago

Thanks for the effort but what we need is official calculation parameters/angles, the "how to" of their calculation what they are providing is calculated times, not what we need

TorCzaf commented 11 months ago

You mean these websites can't be useful at all in knowing the angles?

I asked them all like that "do you have an islamic prayer timetable for all of [Country] cities for every year or month please? Or do you have your own calculation method for prayer times?" And that is how they responded.

Do you want me to ask them like that? "What are the angles of [country] for calculating prayer times?" Or Can you tell me your question so I can send it to them please? :)

meypod commented 11 months ago

You mean these websites can't be useful at all in knowing the angles?

yeah

I think something like this:

"What methods and parameters do you use to calculate the prayer times ? for example some apps that calculate adhan offline use Fajr, Isha and Maghrib angles. Can you provide the numbers or formulas that you use or a link to the official documents that explains what you use ?"

TorCzaf commented 11 months ago

Thanks for adding Algeria and Brunei methods I hope you be able to add the rest :)

I sent your question and I am waiting for their reply. And by the way the site which the Spanish sent already mentions methods http://www.hispanomuslim.es/panya/azala.htm

If you select city, you can see the mentioned method above Screenshot_20230721-174735_Mull

Should that be useful?

TorCzaf commented 11 months ago

Islamske zajednice u Bosni i Hercegovini. (Bosnia and Herzegovina) https://www.islamskazajednica.ba/ I think they use prayer times from https://vaktija.ba/ And here is the source code https://github.com/vaktija

Also please don't forget to add Bosnia and Herzegovina method...I don't think it will be difficult for you to find their parameters..they have source code on github

EDIT: I have my doubts regarding their prayer times it seems different from prayer times of other websites like https://www.islamicfinder.org/world/serbia/787595/novi-pazar-prayer-times/ https://www.prayertime.online/serbia/novi-pazar-2/

meypod commented 11 months ago

Bosnia source code didn't include parameters required for calculating, it only has times

also, the official websites are the source of truth for their times, if other apps are different from them, then the apps are incorrect

TorCzaf commented 11 months ago

also, the official websites are the source of truth for their times

You mean governments websites and their ministries? Unfortunately some governments don't provide official prayer times nor do they provide calculating methods so instead I may find islamic communities for example Like Union of Islamic Communities of Spain.

if other apps are different from them, then the apps are incorrect

The reason I had my doubts is that the 2 websites I mentioned have almost same prayer times and they are different from vaktija.ba prayer times.


Regarding http://www.hispanomuslim.es/panya/azala.htm Did it help you find the angles for prayer times in spain?

TorCzaf commented 11 months ago

http://www.hispanomuslim.es/panya/cmce.htm

This link has lots of Islamic Communities from other countries. Perhaps I will ask some of them about their calculation methods and angles

TorCzaf commented 11 months ago

Here is official response from Union of Islamic Communities of Spain https://ucide.org/ regarding angles and methods for Spain Screenshot_20230724-154156_Tutanota

Assalamu ąlaikum, En España hay libertad en la aplicación del fiqh reconocido. Según las zonas hay mayorías malekíes o hanafíes, por lo que la mezquita puede aplicar el criterio estándar o el hanafí para la oración. Sobre la comunidad musulmana española podéis leer desde el enlace: https://ucide.org/islam/observatorio/informes/. Os deseamos lo mejor, un afectuoso saludo, mą assalama,

### Translation: Assalamu Alaikum, In Spain there is freedom in the application of recognized fiqh. Depending on the area, there are Maleki or Hanafi majorities, so the mosque can apply the standard or Hanafi criteria for prayer. About the Spanish Muslim community you can read from the link: https://ucide.org/islam/observatorio/informes/. We wish you the best, an affectionate greeting, mą assalama,

@meypod

meypod commented 11 months ago

The website you contacted (ucide.org) does not seem to be related to the website you mentioned (hispanomuslim.es)

if they are related, you should have asked for method that is used to generate times on hispanomuslim.es, not in general.

wherever there's a time table, there's a method used to calculate it. we need the details of the method used to calculate it. anything else is not needed.

TorCzaf commented 11 months ago

I sent them a message yesterday at least regarding angles for each region that is part of UCIDE like Valencia city and basque country.

UCIDE consists of several regions so I asked for their angles and now I am waiting for their reply.

By the way I Also sent a message to https://www.qafqazislam.com/index.php?lang=en&sectionid=123 they are Azerbaijanis and have prayer times for Azerbaijani cities ...they should provide us with angles or calculation method. Waiting for their reply.

https://www.koreaislam.org/en/prayer-times/ Also I found Korean prayer times...they are based on Muslim World League https://www-koreaislam-org.translate.goog/en/prayer-times/?uid=31&mod=document&_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-US&_x_tr_pto=wapp

TorCzaf commented 11 months ago

This was my message to ucide.org

Thank you very much for the link. Can you also please provide angles that are used for calculating prayer times in each region of UCIDE Federation? Or at least only angles used for Valencia city and basque country? For example I see some adhan apps use angles for "Federation of Islamic Associations in Basque Country" But I need angles from an official source. And you seem to be the only official source that I can get from those angles used for prayer times because Valencia city and basque country are part of UCIDE

And Here is official response from them Screenshot_20230725-223033_Tutanota

Assalamu ąlaikum, En Euskadi constan las federaciones: CONSEJO ISLAMICO DE EUSKADI, FEDERACIÓN ISLÁMICA DEL PAIS VASCO y UNIÓN DE COMUNIDADES ISLÁMICAS DEL PAÍS VASCO.  En Valencia ciudad constan las federaciones: CONSEJO ISLÁMICO VALENCIANO, FEDERACIÓN DE AGRUPACIONES ISLÁMICAS POR LA CONVIVENCIA EN ESPAÑA y UNION DE COMUNIDADES ISLÁMICAS DE VALENCIA.  Sobre el método de la Muslim World League (fajr angle 18 & isha angle 17) en Europa podéis leer desde el enlace: http://praytimes.org/calculation. Sobre islamofobia podéis leer desde el enlace: https://ucide.org/wp-content/uploads/2022/07/isj21.pdf#page=4. Un saludo, mą assalama,

They probably use Muslim World League method. I am not sure. As for Valencia city and basque country they have mentioned in the message some official sources where I can ask for angles for both regions, ... I think that. They have also provided a website that explains how to calculate prayer times by yourself. I hope you like mathematics :) And I think this should be the best option in case we don't get angles from official sources or reliable angles.

As for Islamophobia link, I didn't request that. Just letting you know.

meypod commented 11 months ago

They have also provided a website that explains how to calculate prayer times by yourself. I hope you like mathematics :)

I use adhan js which does all the mathmatics. I can't touch the internal calculations myself with my limited knowledge

I guess no need to add it if it's same as Muslim world league

TorCzaf commented 11 months ago

I use adhan js which does all the mathmatics. I can't touch the internal calculations myself with my limited knowledge

You mean you can't calculate to get the angles by yourself due to your limited knowledge? I wish if I could bring you more contributors..perhaps I will look for contributors later. I need some thinking.

I guess no need to add it if it's same as Muslim world league

I at least may look for how to contact Valencia and basque country to get their angles and I have 2 reasons for that: -Valencia has prayer timetable http://www.ucidvalencia.org/tiempos_de_oracion.html

-Some apps use angles for basque country like "muslim pro" and "prayer times - Mosque finder" But I don't know if the angles are reliable or not I will see if both regions have special angles/methods or not.

TorCzaf commented 11 months ago

Regarding Morocco calculation method, here is an open source project that focuses on prayer times in cities of Morocoo, I think it is in JavaScript , also it is based on prayer times from Ministry of religious Endowments and Islamic Affairs of Morocoo https://github.com/kafiln/salati You can see if they have parameters or not.

### Edit: They don't have parameters Here is official response from the owner of the project Screenshot_20230728-001350_Tutanota

TorCzaf commented 11 months ago

I got angles for Morocco which I don't know if they are reliable or not This is from "Pillars" a prayer times app Fajr: 18 Isha: 18 It also has other calculation methods by the way Screenshot_20230727-230451

While somebody else mentions on their forums that those are the right angles Fajr: 19,1 Isha: 17 https://pillars.noorahq.com/feature-requests/posts/morocco

Edit: I just realized that he mentioned right angle for Casablanca city in Morocco and not for all cities.

meypod commented 11 months ago

Thanks for the time you have put into this @TorCzaf I am busy with other things at the moment but I will check them soon

TorCzaf commented 11 months ago

Thanks for the time you have put into this

You are most welcome

I am busy with other things at the moment but I will check them soon

Take your time. Brother.

meypod commented 10 months ago

https://github.com/kafiln/salati/ does not calculate times itself