An Islamic astronomy app based on Ikhwan-us-Safaa teachings, calculating 12 hours of day and 12 hours of night with planetary influences using precise astronomical algorithms, GPS location detection, and offline calculations serving users worldwide since 2013.
In 2013, I built Chogadia Hisab to bring Islamic astronomical timing calculations to mobile devices, based on knowledge from the Ikhwan-us-Safaa kitaab that I studied at Aljamea tus Saifiyah. Chogadia is a system rooted in Islamic astronomy that divides the day into 12 hours (sunrise to sunset) and the night into 12 hours (sunset to sunrise), with each hour influenced by different planetary forces. These periods are used to determine auspicious timings for important activities like business meetings, ceremonies, and new ventures.
The challenge was translating the complex astronomical knowledge from Ikhwan-us-Safaa into an app that could accurately calculate these planetary hours based on precise sunrise and sunset times for any location worldwide, make it work completely offline, and present the information in a simple, accessible interface.
Design Philosophy
"Islamic astronomical wisdom meets modern technology. Complex calculations from Ikhwan-us-Safaa made simple and accessible."
Building a Chogadia calculator required solving several technical challenges:
Chogadia calculations depend entirely on accurate sunrise and sunset times. The app needed to calculate astronomical events with precision for any location on Earth, accounting for latitude, longitude, and date variations.
Implemented a dedicated astronomical calculation system using Julian day calculations and solar coordinate algorithms to precisely determine sunrise and sunset times based on geographic coordinates.
Each day of the week follows a different planetary sequence (MUSHTARI, MIRRIKH, SHAMS, ZOHRA, OTARID, QAMAR, ZOHAL). The app needed to divide the daylight period (sunrise to sunset) into exactly 12 hours and the night period (sunset to next sunrise) into exactly 12 hours, then map the correct planetary influence to each hour based on the day of the week.
Created a SQLite database storing planetary hour sequences for each day of the week (24 hours per day), then built runtime logic to divide the day period into 12 hours and night period into 12 hours, mapping planetary influences dynamically to each hour.
Users needed accurate calculations for their current location, but also the flexibility to check Chogadia timings for other cities when traveling or planning remote events. This required GPS integration, manual coordinate entry, and a worldwide city database.
Integrated Google Play Services FusedLocationProviderClient for automatic GPS detection, manual coordinate entry for precision users, and a searchable database of thousands of cities worldwide with pre-calculated coordinates.
Users wanted to see the current Chogadia period at a glance without opening the app. Home screen widgets needed to update automatically as time progressed through different planetary hours, handle timezone changes, and survive device reboots.
Implemented AndroidX WorkManager with 30-minute periodic updates and BroadcastReceiver listeners for system time/timezone changes, ensuring widgets always display accurate current Chogadia information while respecting battery optimization.
Over 11 years of development and refinement, I built a robust architecture that handles all these challenges:
Built a custom calculation engine to determine accurate sunrise and sunset times for any location on Earth. The system calculates all timings in real-time, ensuring precision regardless of location or date (supports years 1900-2100).
Designed a two-layer system: a database stores weekly planetary hour sequences (7 days × 24 hours), while the calculation engine divides the day period (sunrise to sunset) into 12 hours and the night period (sunset to sunrise) into 12 hours. The app then maps the correct planetary influence to each hour, highlights the current hour in real-time, and categorizes each as Excellent, Good, Normal, or Unfavorable.
Integrated automatic GPS location detection with proper permission handling, manual coordinate entry for advanced users, and a worldwide city database with search functionality. The app remembers the last used location and works completely offline after initial setup.
Created a tab-based interface showing separate day and night Chogadia hours. Each hour displays start/end times, planetary influence names, visual color coding for quality rating, and real-time highlighting of the current active hour. Includes date picker for checking future or past dates.
Developed home screen widgets showing current Chogadia hour at a glance. Widgets update periodically and respond to system time changes, timezone changes, and locale changes. The architecture ensures widgets survive device reboots and handle midnight transitions smoothly.
Added English and Arabic language support with proper right-to-left layout handling, allowing users worldwide to use the app in their preferred language.
The app has reached over 443,000 downloads with consistent 4.4 star ratings, serving users worldwide who rely on Chogadia for daily planning and important decisions.
Users consistently praise the accuracy of the calculations, with the app providing reliable timings for business decisions, ceremonies, and daily activities. The astronomical engine handles dates from 1900 to 2100 with consistent precision.
Maintained completely free with no ads, in-app purchases, or data collection. The app collects no user data, shares nothing with third parties, and works entirely offline after initial setup. Users appreciate the privacy-first approach.
Regular updates to support new Android versions (currently supporting Android 7 to Android 14+), add user-requested features like text size preferences and color blind mode, fix bugs, and maintain compatibility across diverse device manufacturers.
For an astrology/timing app, calculation precision directly impacts user trust. Investing time in robust astronomical algorithms and extensive testing across locations and dates was crucial to building user confidence.
Building all calculations to work offline not only improved performance and privacy, but also made the app resilient to network issues and eliminated ongoing API maintenance costs over 11+ years.
Separating static data (planetary sequences) from runtime calculations (actual time periods) created a flexible architecture that made the app fast, maintainable, and easy to extend with new features.
Widget updates and background work have been the most maintenance-intensive features, requiring continuous adaptation as Android evolved from JobScheduler to WorkManager and introduced increasingly strict background execution limits.
Looking for custom Android or iOS development? Our team at Synhex Solutions specializes in native mobile app development.
Get Expert Help from Synhex Solutions