feat: Android APP V1 - Experimental Alpha

This commit is contained in:
2026-06-05 07:40:25 +02:00
parent bf4e6891d1
commit 9a1305f976
179 changed files with 8031 additions and 120 deletions

View File

@@ -0,0 +1,20 @@
import type { MobileAppLifecycleAdapter } from '../../contracts/mobile.contracts';
/** Visibility API fallback for browser runtimes. */
export class WebMobileAppLifecycleAdapter implements MobileAppLifecycleAdapter {
private handler: ((isActive: boolean) => void) | null = null;
async initialize(): Promise<void> {
if (typeof document === 'undefined') {
return;
}
document.addEventListener('visibilitychange', () => {
this.handler?.(!document.hidden);
});
}
onAppStateChange(handler: (isActive: boolean) => void): void {
this.handler = handler;
}
}