An Android companion for competitive programmers. Tracks your daily CodeForres streak, lists upcoming contests, lets you favorite them and set custom reminders, and ranks a leaderboard of friends by rating.
- Streak tracking — three-tier status (safe / warning / danger), cached display, daily alarms gated on "solved today."
- Contests — upcoming CodeForces contests, favorite with default 15-min lead time, add more per contest, confirmation dialogs on delete, reboot persistence.
- Friends leaderboard — add any handle, ranked by rating, self-row highlighted in green. Per-row icon shows if a friend has submitted an accepted solution today.
- Full-screen reminders — alarm ringtone + vibration over the lock screen, 10-minute snooze (suppressed if it would land past the day boundary / contest start).
- Android 9 (API 28) or newer
- Internet permission (the app talks to the CodeForces API)
SCHEDULE_EXACT_ALARMandPOST_NOTIFICATIONSare also requested; grants for the latter are prompted for on Android 13+, the former is routed to the system settings screen on Android 12+.
git clone https://github.com/0xPolybit/cp-reminder.git
cd cp-reminder
./gradlew assembleDebugAPK output: app/build/outputs/apk/debug/app-debug.apk. Install with adb install -r app/build/outputs/apk/debug/app-debug.apk.
Single-activity, View-based Android app (no Compose, no RecyclerView).
CodeForcesApi.kt— all CF API calls (verifyHandle,getProfile(s),getStreakStatus,hasAcceptedToday,getUpcomingContests). SharedhttpGetandparseProfilehelpers. One friend-fetch +mapNotNullper-handle error tolerance, so a single renamed handle can't fail the whole leaderboard.- Alarm pipeline —
AlarmSchedulerfor streak alarms (recurring daily before local midnight),ContestAlarmSchedulerfor one-time contest alarms. Both useAlarmManager.setAlarmClockand ensure theirPendingIntentrequest codes are disjoint via a reserved bit. A sharedAlarmReceiverbranches onEXTRA_KIND;AlarmRingServiceis the foreground service,AlarmRingActivityis the full-screen ringing UI. For streak alarms, the receiver first checksCodeForcesApi.hasAcceptedTodayviagoAsync()and silently skips ringing if the user has already solved. - Persistence — all prefs share one file (
cp_reminder_prefs) with distinct keys per concern (alarms,contest_favorites,friends,streak_cache,cf_username). JSON-serialized viaorg.json.
INTERNET, SCHEDULE_EXACT_ALARM, RECEIVE_BOOT_COMPLETED, WAKE_LOCK, VIBRATE, FOREGROUND_SERVICE, FOREGROUND_SERVICE_MEDIA_PLAYBACK, USE_FULL_SCREEN_INTENT, POST_NOTIFICATIONS.
MIT.content>