Request runtime permissions
Request runtime permissions for microphone access on Android.
阅读时间1 分钟最后更新于 20 小时前
To ensure that your Unreal Android application will properly work with the Vivox SDK, you need to request the
android.permission.RECORD_AUDIOandroid.permission.BLUETOOTH_CONNECTUAndroidPermissionFunctionLibrary::CheckPermissionUAndroidPermissionFunctionLibrary::AcquirePermissionsYou also need to add the#if PLATFORM_ANDROIDconst FString BluetoothConnectPermission = TEXT("android.permission.BLUETOOTH_CONNECT");if (!UAndroidPermissionFunctionLibrary::CheckPermission(BluetoothConnectPermission)) { permissions.Add(BluetoothConnectPermission); UAndroidPermissionFunctionLibrary::AcquirePermissions(permissions);}#endif
AndroidPermission[PROJECT].build.csFor more information on how to request permissions by using the Blueprint API, refer to the the Unreal documentation on Android Permission.PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "AndroidPermission" });