forked from Blendman974/faceclaw
14 lines
608 B
TypeScript
14 lines
608 B
TypeScript
import { Utils } from "@nativescript/core";
|
|
declare const com: any;
|
|
|
|
/** Android Keystore-backed, excluded from backups. Never falls back to plain settings. */
|
|
export function readHealthExportSecret(): string {
|
|
if (!global.isAndroid) return "";
|
|
return String(com.faceclaw.app.FaceclawHealthExportSecret.read(Utils.android.getApplicationContext()));
|
|
}
|
|
|
|
export function writeHealthExportSecret(value: string): void {
|
|
if (!global.isAndroid) throw new Error("Health export is available on Android only");
|
|
com.faceclaw.app.FaceclawHealthExportSecret.write(Utils.android.getApplicationContext(), value);
|
|
}
|