Key flows
How the app starts, downloads its data and moves between screens.
Startup decision flow
- App opens on a themed splash, then the language screen.
- If no language has been chosen, the user must pick English, Telugu or Tamil. Otherwise skip.
- If there is no Bridge account on the device, show login. Cancel closes the app. Success continues at step 5.
- If there is an account:
- All mandatory downloads done (
PREF_KEY_ALL_SYNCS_COMPLETE) → Home. - Else a VO was chosen earlier → resume Data download (Cadre).
- Else → step 5.
- All mandatory downloads done (
- Fresh login: no internet → error, OK closes the app.
- Fetch user profile and roles. Failure → error, OK closes the app.
- Tenant is
ap.gov→ download the Village → Habitation → VO tree.- Failure → error, OK wipes app data and restarts.
- Role contains
unit-inchargeorfmt_l1→ Data download (Unit). - Otherwise → Village/Habitation/VO selection (device registration first if
DEVICE_BINDING_EXTERNAL_SWITCH = 1) → Data download (Cadre).
- Downloads complete → Home.
- On Home (release builds): device registration and remote actions run on top; automatic date/time must be on; app update check; session-expired check.
Data download: Cadre
| # | Item | Mandatory | Runs |
|---|---|---|---|
| 1 | App Configs | Yes | In sequence |
| 2 | Product Master | Yes | In sequence |
| 3 | Practice Master | Yes | In sequence |
| 4 | Farmers | Yes (partial OK) | In sequence |
| 5 | IE Role Map | Yes | In sequence |
| 6 | Farmer Assets → Farmer Asset Attachments | No | In parallel with 7, 8 |
| 7 | Portfolio → Portfolio Attachments | No | In parallel |
| 8 | Farming Model → Farming Model Attachments | No | In parallel |
Rules:
- Starts automatically unless opened in load-more mode.
- Farmers: count first; zero → "No farmers found for the selected work node".
- Farmer page size =
FARMERS_PAGINATION(default 250). - Resume: the current farmer page is saved; the next run with the same VO continues from the failed page.
- Any farmer page succeeded before an error → PARTIAL_SUCCESS, which counts as done.
- No farmers in the database → remaining items marked SUCCESS.
- Attachments need their parent item to be SUCCESS.
- Go to Home when every item is SUCCESS or ERROR and all mandatory items succeeded.
- Refresh of App Configs, Product Master, Practice Master and IE Role Map is ignored within
SETUP_CACHE_DURATION_IN_MINUTES. - Chunk sizes: role map 30; assets
ASSET_LAND_DETAILS_PAGINATION(30); asset attachmentsASSET_ATTACHMENT_PAGINATION(50); portfolio 30; portfolio attachments 50; farming model 30.
Data download: Unit / FMT L1
| # | Item | Mandatory |
|---|---|---|
| 1 | App Configs | Yes |
| 2 | Product Master | Yes |
| 3 | Practice Master | Yes |
| 4 | Farmers (every assigned VO) | Yes (partial OK) |
| 5 | Farmer Assets | No |
| 6 | Portfolio | No |
| 7 | Portfolio Attachments | No |
| 8 | Compact Block (every VO, page size 100) | No |
Rules:
- Farmers and Compact Blocks download per VO with saved progress.
- When every VO is complete, progress resets so the next run is a full refresh.
- Assets and Portfolio run in parallel. No asset attachments or farming model.
- Done → Home in Unit mode.
- Load more is blocked until every queued sync item has been attempted at least once.
Navigation map
- Launcher splash
- Select language (skipped once chosen)
- Splash logic
- Login (if no account)
- Home (if all synced)
- Data download (Cadre) (if VO chosen, not complete)
- Fresh setup
- Unit → Data download (Unit) → Home (Unit)
- Cadre → Village/Habitation/VO selection (+ Device registration) → Data download (Cadre) → Home
- Splash logic
- Select language (skipped once chosen)
- Home (+ Device registration on top in release builds)
- Content
- Farmer list (Cadre)
- Farmer → Farmer hub → Profile, Land, Livestock, Crop Plan, Crop Actual, ATM, KAP, Annual plan, Kitchen Garden, Surveys, Certification, Comments, Inventory
- Bell → Notifications → Farmer hub
- Partial-data banner → Data download (load more)
- VO tabs (Unit) → Endorsement, Survey, Compact Block
- Farmer list (Cadre)
- Bottom bar
- Sync → Pending sync
- Sync error → Sync error log → ATM or Crop Actual
- Analytics → Dashboard → Yesterday / Monthly / Overall MIS → Farmer list
- Disabled land
- Instruction video
- Side menu
- My Plan & Profile → Farmer hub (user mode)
- Analytics (Unit) → Dashboard
- Program Configuration, Program Instructions, Login History
- Activity Tracker (Cadre)
- Endorsements (Unit) → VO tabs
- Settings
- Change language → Home restart
- Load more data → Data download (load more) → Change → VO selection; or Unit download
- Force sync, Report sync issues, Backup
- Notifications web page, Privacy, Terms
- Open source licenses
- Logout → Splash
- Content
- Device registration → (conflict) Pending sync, Login here, or Logout → Splash