Android app static analysis — build navigation map, API scenarios, and View state map
Analyze the Android source code in the current project to build a complete app map.
Run all three analyses in order and save results to .claude/app-map/.
Analyze:
AndroidManifest.xml for Activity declarationsstartActivity(), startActivityForResult() callsnav_graph.xml, navigation/*.xml for Fragment transitionsIntent creation patternsSave to: .claude/app-map/navigation_map.mermaid
Format: Mermaid flowchart showing Activity/Fragment transition relationships.
Analyze:
@GET, @POST, @PUT, annotations@DELETEonSuccess) and error (onError) branchesSave to: .claude/app-map/api_scenarios.json
Format:
{
"apis": [
{
"endpoint": "GET /api/users",
"interfaceFile": "UserApi.kt:15",
"callers": [
{
"file": "UserViewModel.kt:42",
"successHandler": "UserViewModel.kt:45-50",
"errorHandler": "UserViewModel.kt:51-55"
}
]
}
]
}
Analyze:
View.VISIBLE, View.GONE, View.INVISIBLE conditionsLiveData.observe(), StateFlow.collect() call sites@{viewModel.isLoading})Save to: .claude/app-map/view_state_map.json
Format:
{
"screens": [
{
"name": "LoginActivity",
"file": "LoginActivity.kt",
"states": [
{
"viewId": "btn_login",
"visibilityCondition": "isFormValid && !isLoading",
"dataSource": "LoginViewModel.loginFormState",
"sourceFile": "LoginActivity.kt:67"
}
]
}
]
}
.claude/app-map/ directory if it doesn't exist.