Android Prayer Times Library (AZAN)

Ahmed Mahmoud Eltaher
3 min readFeb 1, 2020


Minaret of Great Mosque of Mecca

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.

Calculate the time difference between the sun hits its highest point in the sky (Dhuhr time) and any other angle
Calculate Asr time
Calculate Sunset time

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

All supported methods in Azan library

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 add maven { url '' }
allprojects {  
repositories {
maven {
url ''
  • in your build.gradle of your app 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("date ---> " + + " / " + 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())