FactsheetPlanning & tracking
Who uses it Field staff / CRP (regular cadre) How you get here Drawer > Activity Tracker. Hidden for Unit login (unit-incharge / fmt_l1). Tables AssessmentInstanceAssessee (assessment library), Attachment (assessment library) APIs 3 calls today, 6 App Service operations Offline Answers saved locally in assessment library tables; submit queues the response and photo uploads with retry (dooWithRetry). assessmentTakenOn = selected date at 00:00 UTC. Screens What it captures Rules API contracts Behaviour notes Improve in the rewrite Screens Screen What it does Source Activity calendar Month view coloured by submitted / saved days. app/src/main/java/org/platformcommons/urvi/view/activity_tracker/ActivityCalendarFragment.kt Activity history (day) Activities answered on one day, add and submit. app/src/main/java/org/platformcommons/urvi/view/activity_tracker/ActivityHistoryFragment.kt Activity list Pick an activity (question) to answer, with search. app/src/main/java/org/platformcommons/urvi/view/activity_tracker/ActivityListFragment.kt Save activity Answer one activity with photo. app/src/main/java/org/platformcommons/urvi/view/activity_tracker/SaveActivityFragment.kt Selectable response Option picker for objective and custom questions. app/src/main/java/org/platformcommons/urvi/view/activity_tracker/SelectableResponseFragment.kt
What it captures Field Type Required Validation Options from Objective / Multiselect answer Single or multi option picker Yes At least 1 option. Assessment question options (ASSESSMENT_CODE_ACTIVITY_TRACKER) Custom crop / VO / SHG / lead farmer answer Picker Yes At least 1. Question APCNF_SURVEY_ACTIVITYTRACKER_012 is forced to single-select. Local data: product SKU (by language), VO list, all SHGs, lead farmers Subjective answer Text, or two numeric fields when the question has 2 hint labels Yes Two-field form: a decimal up to 999.99 and an integer up to 5 digits; both required. User input File upload answer Attachment Yes Device files Photo Camera Yes Mandatory for every activity; compressed to about 45 KB JPEG. Device camera Location GPS No Attached when available. Device GPS
Rules Conditions from the code, rewritten as plain decision rules.
When Then A day has a record with a server id or a pending upload Calendar day coloured primary (submitted). A day has a record without server id or pending upload Calendar day coloured orange (saved, not submitted). User taps a future day It cannot be opened. Selected date is today and nothing submitted for the day "+" add-activity button is shown; hidden for past days. Activity already answered that day Toast "activity already added". Editing an answered activity Allowed only on the same day and before 18:00. Submitting today before 18:00 Blocked with snackbar "submit activity warning". Submitting today at or after 18:00, or a past day at any time Confirmation dialog, then assessment-response POST plus one attachment upload per photo are queued.
API contracts Each call opens to its use case, headers, request and response bodies, and errors.
Behaviour notes Assessee is the logged-in user (actor type Bridge user); sub-type ASSESSMENT_SUB_TYPE_ACTIVITY_TRACKER. Improve in the rewrite Show the "editable until 18:00 / submit after 18:00" rule on screen. Make the 18:00 cut-off and photo size configurable.