fix: Bug - Android app doesn't ask for permissions
Prompt for microphone, camera, and notification runtime permissions during Capacitor startup, and fall back to WebView getUserMedia when the native preflight bridge fails so voice joins still surface Android permission dialogs. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -4,11 +4,13 @@ import { resolveMobileAdapter } from '../logic/mobile-capacitor-adapter.rules';
|
||||
import type { MobileAppLifecycleAdapter } from '../contracts/mobile.contracts';
|
||||
import { WebMobileAppLifecycleAdapter } from '../adapters/web/web-mobile-app-lifecycle.adapter';
|
||||
import { MobilePlatformService } from './mobile-platform.service';
|
||||
import { MobileRuntimePermissionsService } from './mobile-runtime-permissions.service';
|
||||
|
||||
/** Facade for foreground/background lifecycle events. */
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class MobileAppLifecycleService {
|
||||
private readonly mobilePlatform = inject(MobilePlatformService);
|
||||
private readonly runtimePermissions = inject(MobileRuntimePermissionsService);
|
||||
private adapter: MobileAppLifecycleAdapter = new WebMobileAppLifecycleAdapter();
|
||||
private adapterReady: Promise<MobileAppLifecycleAdapter> | null = null;
|
||||
private initialized = false;
|
||||
@@ -22,6 +24,7 @@ export class MobileAppLifecycleService {
|
||||
|
||||
await adapter.initialize();
|
||||
this.mobilePlatform.refreshRuntimeDetection();
|
||||
await this.runtimePermissions.initialize();
|
||||
this.initialized = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user