feat: request Android startup permissions
This commit is contained in:
@@ -263,11 +263,11 @@ class _BetaHomeState extends State<_BetaHome> with WidgetsBindingObserver {
|
||||
await showDialog(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
title: const Text('Microphone Access'),
|
||||
title: const Text('Permissions'),
|
||||
content: const Text(
|
||||
'Chanora needs microphone access to transmit your voice in '
|
||||
'TeamSpeak channels. Without this permission, you can only '
|
||||
'listen to others.',
|
||||
'Chanora requests microphone, Bluetooth headset, and '
|
||||
'notification permissions at startup so voice, headset '
|
||||
'routing, and the foreground session work correctly.',
|
||||
),
|
||||
actions: [
|
||||
TextButton(
|
||||
@@ -277,7 +277,7 @@ class _BetaHomeState extends State<_BetaHome> with WidgetsBindingObserver {
|
||||
FilledButton(
|
||||
onPressed: () {
|
||||
Navigator.pop(ctx);
|
||||
_androidPermissions.ensureRecordAudio();
|
||||
_androidPermissions.ensureStartupPermissions();
|
||||
},
|
||||
child: const Text('Allow'),
|
||||
),
|
||||
@@ -286,7 +286,7 @@ class _BetaHomeState extends State<_BetaHome> with WidgetsBindingObserver {
|
||||
);
|
||||
await _uiPreferences.markPermissionsExplained();
|
||||
} else {
|
||||
await _androidPermissions.ensureRecordAudio();
|
||||
await _androidPermissions.ensureStartupPermissions();
|
||||
}
|
||||
}
|
||||
} catch (_) {}
|
||||
|
||||
Reference in New Issue
Block a user