Skip to content

bug: biometric auth broken on Android — MainActivity extends FlutterActivity, not FlutterFragmentActivity #129

Description

@0takuc0mrade

Problem

`android/app/src/main/kotlin/com/example/nodus_protocol_mobile/MainActivity.kt` declares:

```kotlin
class MainActivity: FlutterActivity()
```

The app gates all wallet access behind biometrics (`lib/services/biometric_service.dart` + `lib/widgets/app_lock_gate.dart`, wired in `main.dart` via `AppLockGate`). The `local_auth` plugin requires `FlutterFragmentActivity` on Android; with `FlutterActivity` the call throws a `no_fragment_activity` `PlatformException`.

Since `authenticate()` fails-closed to `false`, the lock screen can never unlock via biometrics on real Android devices — a shipping-blocker security/UX defect.

Scope (low-code)

One-line class change plus import (`io.flutter.embedding.android.FlutterFragmentActivity`).

Acceptance criteria

  • `MainActivity` extends `FlutterFragmentActivity`.
  • Biometric prompt succeeds/cancels on a physical Android device without `no_fragment_activity`.
  • Existing `biometric_service_test.dart` / `app_lock_gate_test.dart` still pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions