Onboarding "Disconnect Other Apps" page handles case where Even app isn't installed

This commit is contained in:
James Babcock committed 2026-09-11 21:58:31 -07:00
1 parent 5b8f503ce3
commit 6d85c0ac3e
4 files changed
+38 -15

No files matched your search

+14 -6
View File
@@ -1,4 +1,4 @@
import { Utils } from "@nativescript/core";
import { Dialogs, Utils } from "@nativescript/core";
declare const com: any;
@@ -23,11 +23,19 @@ export function readEvenAppNotificationState(): EvenAppNotificationState {
}
export function openEvenAppSettings(): void {
if (!global.isAndroid) return;
const context = Utils.android.getApplicationContext();
if (context) {
com.faceclaw.app.FaceclawEvenAppDetector.openEvenAppSettings(context);
}
const context = global.isAndroid ? Utils.android.getApplicationContext() : null;
const result = context
? com.faceclaw.app.FaceclawEvenAppDetector.openEvenAppSettings(context)
: "failed";
if (result === "opened") return;
const notInstalled = result === "not-installed";
void Dialogs.alert({
title: notInstalled ? "Even app not installed" : "Unable to open Even app settings",
message: notInstalled
? "The official Even Realities app isn't installed on this phone. If your glasses are connected to another app or phone, disconnect them there. Otherwise, you can continue."
: "Open your phone's settings manually to manage the Even app, or disconnect your glasses from within the app that's connected to them.",
okButtonText: "OK",
});
}
export function openNotificationAccessSettings(): void {