adhan app for Oued ZEM, Morocco devloped for blackberry torch 9800
# BlackBerry OS Adhan Application
An open-source, lightweight Islamic Prayer Times (Adhan) application built natively for legacy **BlackBerry OS** devices (BlackBerry OS 5.0 / 6.0 / 7.0).
Developed by **Mohamed BOURI**.
---
## Features
* **Native BlackBerry UI:** Built using native RIM BlackBerry UI primitives (`UiApplication`, `MainScreen`, custom `Manager`).
* **RTL & Custom Alignment:** Clean Arabic UI support with right-to-left layout alignment for prayer names and times.
* **Astronomical Prayer Calculations:** Accurate astronomical calculation of Fajr, Sunrise, Dhuhr, Asr, Maghrib, and Isha without needing an internet connection.
* **Background Timer & Notifications:** Runs in the background, updates the UI dynamically, and plays the Adhan audio when prayer time arrives.
* **Audio Playback:** Built-in player (`AdhanPlayer`) utilizing JSR-135 Mobile Media API (`MMAPI`).
---
## Project Structure
```
net.mbeffects.adhan
├── AdhanApp.java # Main Application Entry Point (UiApplication)
├── AdhanMainScreen.java # Primary User Interface & Custom RTL Layout
├── PrayerCalculator.java # Mathematical & Astronomical Calculation Engine
├── TimerService.java # Background Daemon Thread for updating UI & alerts
└── AdhanPlayer.java # Audio Engine for playing adhan.mp3
```
---
## How to Modify Prayer Calculations (`PrayerCalculator.java`)
The core calculation logic is isolated inside `PrayerCalculator.java`. You can easily adapt this application to **any city or country** by modifying the constants at the top of the class.
### 1. Location & Timezone Parameters
To change the target city, update the location parameters:
```java
private static final double LAT = 32.85; // Latitude (e.g., 32.85 for Oued Zem)
private static final double LNG = -6.58; // Longitude (e.g., -6.58 for Oued Zem)
private static final double ALTITUDE = 765.0; // Altitude in meters above sea level
private static final double TIMEZONE …