Initial commit: Android & Garmin Remote Camera App with Live Preview

This commit is contained in:
Gemini Bot
2025-12-09 05:39:37 +00:00
commit 55f7df71d8
21 changed files with 951 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
import Toybox.Application;
import Toybox.Lang;
import Toybox.WatchUi;
import Toybox.Communications;
class FotoCompanionApp extends Application.AppBase {
var view;
function initialize() {
AppBase.initialize();
}
function onStart(state as Dictionary?) as Void {
// Register for messages from the phone
Communications.registerForPhoneAppMessages(method(:onPhoneMessage));
}
function onStop(state as Dictionary?) as Void {
}
function onPhoneMessage(msg as Communications.Message) as Void {
if (view != null) {
view.updateImage(msg.data);
}
}
function getInitialView() as Array<Views or InputDelegates>? {
view = new FotoCompanionView();
return [ view, new FotoCompanionDelegate(view) ] as Array<Views or InputDelegates>;
}
}