Android Prayer Times Library (AZAN)
What is Azan?
The Adhan, also written as Adhaan, Azan, Azaan or Athan (Arabic: أَذَان [ʔaˈðaːn]), also called Ezan in Turkish,[1] is the Islamic call to prayer, recited by the mu’azzin at prescribed times of the day. The root of the word is ʾadhina أَذِنَ meaning “to listen, to hear, be informed about”. Another derivative of this word is ʾudhun (أُذُن), meaning “ear”.
To calculate time prayers you need solid mathematical knowledge to solve such complex equations in your app, to calculate it in right.
Azan 3.0.0 is so simple and much easier no need to implement such equations again, you just call it.
Azan Android Library is written in Kotlin to calculate Muslim Prayer times and Azan time depends on many variables to calculate:
- latitude
- longitude
- timezone
- height
- The Way of Calculation
Prayer Times Azan Android Library’s available methods
How To use?
Add it to dependencies in your Gradle file
- Add it in your root
build.gradle
at the end of repositories: - in your
allprojects
section, you have to addmaven { url 'https://jitpack.io' }
allprojects {
repositories {
maven {
url 'https://jitpack.io'
}
}
}
- in your
build.gradle
of yourapp
module, Add the dependency
implementation 'com.github.ahmedeltaher:Azan:3.0.0'
Example of how to call prayer times
val today = SimpleDate(GregorianCalendar())
val location = Location(30.045411, 31.236735, 2.0, 0)
val azan = Azan(location, Method.EGYPT_SURVEY)
val prayerTimes = azan.getPrayerTimes(today)
val imsaak = azan.getImsaak(today)
println("----------------results------------------------")
println("date ---> " + today.day + " / " + today.month + " / " + today.year)
println("imsaak ---> $imsaak") println("Fajr ---> " + prayerTimes.fajr())
println("sunrise --->" + prayerTimes.shuruq())
println("Zuhr --->" + prayerTimes.thuhr())
println("Asr --->" + prayerTimes.assr())
println("Maghrib --->" + prayerTimes.maghrib())
println("ISHA --->" + prayerTimes.ishaa())
println("----------------------------------------")