The Origin Story

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."

The Challenge

Building a Chogadia calculator required solving several technical challenges:

1. Astronomical Precision

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.

Solution: Custom Astronomical Engine

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.

2. Complex Planetary Hour Sequence

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.

Solution: SQLite Database with Smart Calculation

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.

3. Location Detection and Worldwide Support

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.

Solution: Multi-Mode Location System

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.

4. Real-Time Updates and Widget Integration

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.

Solution: WorkManager Background Updates

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.

The Solution

Over 11 years of development and refinement, I built a robust architecture that handles all these challenges:

Technical Architecture

Precise Astronomical Calculations

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).

Intelligent Chogadia Calculation System

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.

Flexible Location System

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.

Intuitive Day/Night Interface

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.

Home Screen Widgets

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.

Multi-Language Support

Added English and Arabic language support with proper right-to-left layout handling, allowing users worldwide to use the app in their preferred language.

Impact & User Response

443,000+ Downloads

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.

Precision Astronomical Calculations

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.

Completely Free and Privacy-Focused

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.

11+ Years of Active Maintenance

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.

Lessons Learned

Accuracy is Non-Negotiable

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.

Offline-First Wins Long-Term

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.

Database Design Matters

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.

Background Work Requires Constant Adaptation

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.

Technologies Used

Android SDK Java SQLite WorkManager ViewPager Material Design Google Play Services BroadcastReceiver

Project Details

Platform
Android (API 24 - 34)
Project Type
Mobile App
Downloads
443,000+
Released
September 4, 2013
Status
Active & Maintained

Download the App

Try Chogadia Hisab yourself. Available for free on Google Play Store with no ads.

Get it on Google Play

Need a Mobile App?

Looking for custom Android or iOS development? Our team at Synhex Solutions specializes in native mobile app development.

Get Expert Help from Synhex Solutions