Features / Home & navigation

Home and bottom bar

The main screen after setup. Cadre users see the farmer list with an Add farmer button; Unit users see Endorsement, Survey and Compact Block cards. A bottom bar gives search, analytics, sync and other shortcuts.

FactsheetHome & navigation
Who uses it
CadreUnit In-Charge / FMT L1
How you get here
After data download completes, or directly on launch once setup is complete.
Tables
ie_flat_entity, sync_error_logs, product
APIs
9 calls today, 7 App Service operations
Offline
Works offline after setup. Writes queue up and sync automatically when online.

Screens

ScreenWhat it doesSource
HomeFragment container, bottom app bar and centre Add farmer button.app/src/main/java/org/platformcommons/urvi/view/home/HomeActivity.kt

What it captures

FieldTypeRequiredValidationOptions from
SearchtextNoFilters the current list. Opening search hides the Add farmer button and the sync icon.Typed

Rules

Conditions from the code, rewritten as plain decision rules.

WhenThen
The user is Unit (launch extra INTENT_UNIT_LOGIN, otherwise pref KEY_IS_UNIT_LOGIN)Show the VO tabs: Endorsement, Survey, Compact Block. Hide the Add farmer button.
The user is CadreShow the farmer list with a notification bell, home banner text (HOME_BANNER_TXT_ENG / HOME_BANNER_TXT_TEL) and the Add farmer button.
Any download item is PARTIAL_SUCCESS (farmer list)Show a partial-data banner that opens Data download in load-more mode.
This is a release buildOpen Device registration on top on every Home start.
This is a release build and automatic date/time is off (checked on every resume)Show a non-dismissable dialog whose only button, Settings, opens date settings.
Home opensCheck for an app update (immediate in-app update).
Online and the session id is emptyShow "Session expired"; Login re-authenticates.
A Cadre has not had the one-time data wipe (isUserDataCleared false)Upload a zip of the data, send the sync queue, then show "Restart app"; OK wipes the app. On failure offer Retry.
refreshData is setShow a progress dialog while the season column is updated on portfolios.
Sync icon is tappedOpen Pending Sync, start a sync and toast "Everything synced and backed up" or "Pending items to be synced: N".
The sync error log has entriesShow the sync-error icon with a count of unprocessed entries.
Analytics icon is tappedOpen the Analytics dashboard (icon hidden while on the dashboard).
The module's instruction video is enabled and YT_POP_UP_ALWAYS_SHOW = 1Pop up the YouTube instruction video automatically.

API contracts

Each call opens to its use case, headers, request and response bodies, and errors.

App Service v2: operationUse
GET /session/bootstrapSession bootstrap after login and on cold start
GET /configTyped config bundle (ETag)
GET /farmers/snapshotCursor-paged hydrated farmer snapshot
GET /farmers/changesDelta sync: upserts and tombstones since a cursor
GET /endorsementsEndorsement statuses (VO, SHG, farmer)
GET /notificationsMIS and system notifications since a time
POST /telemetryScreen events and sync-health counters (no PII)

Behaviour notes

  • Bottom bar icons: Search, Analytics, Sync (badge refreshed about every 0.8 s), Filter, Sync error, Disabled land, Instructions video.
  • Background work started on Home: notifications (24 h), analytics (12 h, Cadre only), comment notifications (1 h), endorsement data (15 min after first cache), ref data, sync-detail upload, user analytics; disabled-land fetch on resume; immediate sync; tenant products fetch when needed; Firebase Remote Config; push topics urvi_endorsement_status and urvi_endorsement_comment; sync-ledger repair.
  • Tenant products are fetched when the product table is empty, any SKU lacks a crop type.
  • Possible bug · unverified the farmer list fragment is tagged with the VoTabFragment name, which can confuse back-stack lookups.
  • Several messages are hard-coded English (e.g. "Pending items to be synced").

Improve in the rewrite

  • Do not carry over the one-time data-wipe migration.
  • Localise all hard-coded messages.
  • Drive release-only checks with a feature flag.