aboutsummaryrefslogtreecommitdiff
path: root/source/app/OtpWalletApp.mc
blob: 88588787dba74ed35c2893dce0c027d48196222a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Author:  cirakg & claude ai
// Summary: Application entry point (Connect IQ AppBase): lifecycle and first view.
//
// OtpWalletApp: the application entry point (Connect IQ AppBase).
//
// M0 skeleton: the app shows a home screen with its name and version. Later
// milestones add the vault, settings processing, locking and the glance.
//
// Connect IQ lifecycle: initialize -> onStart -> getInitialView -> (views run)
// -> onStop.
//
// Security note for later milestones: onStop is where every key and decrypted
// secret gets wiped. It runs when the user leaves the app, and also when
// Garmin's system passcode shuts running apps down.

import Toybox.Application;
import Toybox.Lang;
import Toybox.WatchUi;

class OtpWalletApp extends Application.AppBase {

    function initialize() {
        AppBase.initialize();
        // Start of the start-up timer reported by `make perf` (debug builds only).
        Diag.markStart();
    }

    // Called after the app is loaded, before the first view is shown.
    function onStart(state as Dictionary?) as Void {
    }

    // Called when the app exits, for any reason.
    function onStop(state as Dictionary?) as Void {
    }

    // The first screen and its input handler.
    function getInitialView() as [Views] or [Views, InputDelegates] {
        return [new HomeView(), new HomeDelegate()];
    }
}