Skip to main content

Self-Report

Self-Report allows members to manually log visits when automatic detection (via geofencing/proximity) was not possible. These reports may later be verified by admins and tagged as Manual visits.


What you can build

  • “Missed visit?” button on Today/Calendar screens.
  • Self-report history with delete option.
  • Admin workflows where manual reports are flagged.

Submit a self-report

Android (Kotlin)

val result = withContext(Dispatchers.IO) {
AFCore.selfReport().submit(
facilityId = 42,
timestampInSeconds = Clock.System.now().epochSeconds,
timeSpentInSeconds = 3600,
atFacility = true
)
}

iOS (Swift)

let result = try await AFCore.shared.selfReport().submit(
facilityId: 42,
timestampInSeconds: Int64(Date().timeIntervalSince1970),
timeSpentInSeconds: 3600,
atFacility: true
)

Delete a self-report

Android (Kotlin)

val ok = withContext(Dispatchers.IO) {
AFCore.selfReport().delete("2025-08-20")
}

iOS (Swift)

let ok = try await AFCore.shared.selfReport().delete("2025-08-20")

UI patterns & tips

  • Prompt confirmation when submitting retroactive visits.
  • Clearly distinguish Automatic vs Manual visits in UI.

Error handling

  • Show validation errors if facilityId/date missing.
  • Allow retry if network unavailable.

Quick reference

AFCore.selfReport().get()
AFCore.selfReport().submit(facilityId, tsSec, duration, lat, lng, atFacility)
AFCore.selfReport().delete(date)