# MainApplication

- File ID: file:p180ke:mainapplication-cs
- Path: NexusReader.Maui/Platforms/Android/MainApplication.cs
- Role: startup
- Layer: frontend

## Purpose

Android platform entry for the MAUI app; provides the Android Application subclass that creates the MauiApp via MauiProgram and surfaces startup logging and error reporting.

## Key Details

Annotated with [Application] so Android uses this entrypoint; CreateMauiApp is wrapped in try/catch with logging and rethrows to propagate startup failures.

## Symbols

- MainApplication: Android platform entry for the MAUI app; provides the Android Application subclass that creates the MauiApp via MauiProgram and surfaces startup logging and error reporting.
- MainApplication(): Android Application constructor that calls base and logs construction.
- CreateMauiApp(): Overrides MauiApplication.CreateMauiApp to construct the MAUI app via MauiProgram.CreateMauiApp with logging and error handling.
- MainApplication: Android Application subclass that bootstraps the MAUI app on Android and provides platform-specific startup behavior.

## Dependencies

- No resolved dependencies.

## Calls

- No resolved calls.

## Unresolved References

- dependency-target: MauiProgram.cs
- call-target: MauiProgram.cs

## Coverage

- Symbols: 4
- Executable symbols: 2
- Executable symbols with control flow: 2
- Grounded edges: 4
- Unresolved references: 2
- Control-flow fragments: 2
- Unresolved jumps: 1
- Unsupported constructs: 0
- Control-flow coverage: 100%
- Required diagrams: 2
- Generated diagrams: 3

## Control Flow Fragments

- MainApplication: 3 nodes, 2 edges, 0 jumps, 0 unsupported constructs
- CreateMauiApp: 13 nodes, 12 edges, 1 jumps, 0 unsupported constructs

## Diagrams

### MainApplication Neighborhood

```mermaid
flowchart LR
    class_471u2p_mainapplication("MainApplication")
    file_p180ke_mainapplication_cs("MainApplication")
    method_1281z7w_mainapplication[["MainApplication()"]]
    method_197aset_createmauiapp[["CreateMauiApp()"]]
    type_1143kg0_mainapplication[/"MainApplication"/]
```

### MainApplication Execution Overview

```mermaid
flowchart TD
    class_471u2p_mainapplication("MainApplication")
    method_1281z7w_mainapplication[["MainApplication()"]]
    method_197aset_createmauiapp[["CreateMauiApp()"]]
    unresolved_unresolved_13b6ke4_call_target{"Unresolved: CreateMauiApp"}
    class_471u2p_mainapplication -->|contains| method_1281z7w_mainapplication
    class_471u2p_mainapplication -->|contains| method_197aset_createmauiapp
    method_197aset_createmauiapp -->|unresolved call| unresolved_unresolved_13b6ke4_call_target
```

### CreateMauiApp() Control Flow

```mermaid
flowchart TD
    method_197aset_createmauiapp__call_25_CreateMauiApp[["CreateMauiApp"]]
    method_197aset_createmauiapp__action_22_log_22__linear("Startup trace")
    method_197aset_createmauiapp__action_23_createmauiapp_try_23_0__try("Begins protected execution")
    method_197aset_createmauiapp__action_23_try_catch_23__linear("Wraps Maui app creation")
    method_197aset_createmauiapp__action_26_log_26__linear("Success log")
    method_197aset_createmauiapp__action_29_createmauiapp_catch_29_2__catch("catch Exception ex")
    method_197aset_createmauiapp__action_31_log_31__linear("Error logging")
    method_197aset_createmauiapp__action_32_log_32__linear("Stack trace logging")
    method_197aset_createmauiapp__action_33_createmauiapp_throw_33_3__throw{"Throws exception"}
    method_197aset_createmauiapp__action_33_rethrow_33__linear("Propagates startup exception")
    method_197aset_createmauiapp__entry(["CreateMauiApp entry"])
    method_197aset_createmauiapp__action_27_createmauiapp_return_27_1__return(["Returns result"])
    method_197aset_createmauiapp__implicit_return(["return"])
    method_197aset_createmauiapp__action_22_log_22__linear -->|next| method_197aset_createmauiapp__action_23_try_catch_23__linear
    method_197aset_createmauiapp__action_23_createmauiapp_try_23_0__try -->|no params expects to return a configured MauiApp| method_197aset_createmauiapp__call_25_CreateMauiApp
    method_197aset_createmauiapp__action_23_try_catch_23__linear -->|next| method_197aset_createmauiapp__action_23_createmauiapp_try_23_0__try
    method_197aset_createmauiapp__action_26_log_26__linear -->|return| method_197aset_createmauiapp__action_27_createmauiapp_return_27_1__return
    method_197aset_createmauiapp__action_27_createmauiapp_return_27_1__return -->|exception| method_197aset_createmauiapp__action_29_createmauiapp_catch_29_2__catch
    method_197aset_createmauiapp__action_29_createmauiapp_catch_29_2__catch -->|next| method_197aset_createmauiapp__action_31_log_31__linear
    method_197aset_createmauiapp__action_31_log_31__linear -->|next| method_197aset_createmauiapp__action_32_log_32__linear
    method_197aset_createmauiapp__action_32_log_32__linear -->|exception| method_197aset_createmauiapp__action_33_createmauiapp_throw_33_3__throw
    method_197aset_createmauiapp__action_33_createmauiapp_throw_33_3__throw -->|next| method_197aset_createmauiapp__action_33_rethrow_33__linear
    method_197aset_createmauiapp__action_33_rethrow_33__linear -->|return| method_197aset_createmauiapp__implicit_return
    method_197aset_createmauiapp__call_25_CreateMauiApp -->|next| method_197aset_createmauiapp__action_26_log_26__linear
    method_197aset_createmauiapp__entry -->|next| method_197aset_createmauiapp__action_22_log_22__linear
```

## Diagram Validation

- Status: warn
- Warning: Control-flow extraction left 1 unresolved jumps.
