Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CP Reminder

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.

Platform Kotlin Android Gradle Plugin License

Features

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

Requirements

  • Android 9 (API 28) or newer
  • Internet permission (the app talks to the CodeForces API)
  • SCHEDULE_EXACT_ALARM and POST_NOTIFICATIONS are also requested; grants for the latter are prompted for on Android 13+, the former is routed to the system settings screen on Android 12+.

Build

git clone https://github.com/0xPolybit/cp-reminder.git
cd cp-reminder
./gradlew assembleDebug

APK output: app/build/outputs/apk/debug/app-debug.apk. Install with adb install -r app/build/outputs/apk/debug/app-debug.apk.

Architecture

Single-activity, View-based Android app (no Compose, no RecyclerView).

  • CodeForcesApi.kt — all CF API calls (verifyHandle, getProfile(s), getStreakStatus, hasAcceptedToday, getUpcomingContests). Shared httpGet and parseProfile helpers. One friend-fetch + mapNotNull per-handle error tolerance, so a single renamed handle can't fail the whole leaderboard.
  • Alarm pipelineAlarmScheduler for streak alarms (recurring daily before local midnight), ContestAlarmScheduler for one-time contest alarms. Both use AlarmManager.setAlarmClock and ensure their PendingIntent request codes are disjoint via a reserved bit. A shared AlarmReceiver branches on EXTRA_KIND; AlarmRingService is the foreground service, AlarmRingActivity is the full-screen ringing UI. For streak alarms, the receiver first checks CodeForcesApi.hasAcceptedToday via goAsync() 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 via org.json.

Permissions

INTERNET, SCHEDULE_EXACT_ALARM, RECEIVE_BOOT_COMPLETED, WAKE_LOCK, VIBRATE, FOREGROUND_SERVICE, FOREGROUND_SERVICE_MEDIA_PLAYBACK, USE_FULL_SCREEN_INTENT, POST_NOTIFICATIONS.

License

MIT.content>

About

Android app to remind Codeforces streaks and contests, along with friendly leaderboards.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages