Prayer Times provides a set of handy functions to calculate prayer times for any location around the world, based on a variety of calculation methods currently used in Muslim communities.
You can report any issue on issues page. Note: If you speak Arabic, you can submit issues with Arabic language and I will check them. :)
Maven
<dependency>
<groupId>net.alhazmy13.PrayerTimes</groupId>
<artifactId>library</artifactId>
<version>1.0.1-beta</version>
</dependency>
Gradle
dependencies {
compile 'net.alhazmy13.PrayerTimes:library:1.0.1-beta'
}
You will need to create a new instance of PrayerTime
. Once the instance are configured, you can call getPrayerTimes()
.
PrayerTime prayers = new PrayerTime();
prayers.setTimeFormat(PrayerTime.TimeFormat.Time12);
prayers.setCalcMethod(PrayerTime.Calculation.Makkah);
prayers.setAsrJuristic(PrayerTime.Juristic.Shafii);
prayers.setAdjustHighLats(PrayerTime.Adjusting.AngleBased);
prayers.setOffsets(new int[]{0, 0, 0, 0, 0, 0, 0});
ArrayList<String> prayerTimes = prayers.getPrayerTimes(Calendar.getInstance(),
latitude, longitude, timezone);
setTimeFormat
To change the time format to:Time24
24-hour formatTime12
12-hour formatTime12NS
12-hour format with no suffixFloating
floating point number
prayers.setTimeFormat(PrayerTime.TimeFormat.Time12);
setCalcMethod
To change the Calculation Methods.Karachi
University of Islamic Sciences, KarachiISNA
Islamic Society of North America (ISNA)MWL
Muslim World League (MWL)Makkah
Umm al-Qura, MakkahEgypt
Egyptian General Authority of SurveyJafari
Ithna AshariTehran
Institute of Geophysics, University of TehranCustom
Custom Setting
prayers.setCalcMethod(PrayerTime.Calculation.Makkah);
setAsrJuristic
To change Juristic Method for AsrShafii
Shafii (standard)Hanafi
Hanafi
prayers.setAsrJuristic(PrayerTime.Juristic.Shafii);
setAdjustHighLats
Adjusting Methods for Higher LatitudesNone
No adjustmentMidNight
middle of nightOneSeventh
1/7th of nightAngleBased
angle/60th of night
prayers.setAdjustHighLats(PrayerTime.Adjusting.AngleBased);
setOffsets
Tune timings for adjustments
prayers.setOffsets(new int[]{0, 0, 0, 0, 0, 0, 0});
Copyright 2016 alhazmy
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.