मुख्य कंटेंट तक स्किप करें

सेवा प्रमाणीकरण दोबारा करें

ServiceAuthType के लिए एक और authorization attempt का अनुरोध करें।

API संदर्भ

Swift
/// Retries authentication for the specified service.
/// - Parameters:
///   - service: The service whose authentication should be retried.
///   - completion: A closure that is called when the operation completes.
///     - success: `true` if the operation was successful; otherwise `false`.
///     - error: An `NSError` object that describes the error that occurred, or `nil` if the operation was successful.
func retryServiceAuth(
    _ service: ServiceAuthType,
    completion: AIBudsCompletionHandler?
)

retryServiceAuth देखें।

SwiftObjective-Cसेवा
.starBurstAIBudsServiceAuthTypeStarBurstStarBurst AI सेवा
.onDeviceVoiceAssistantAIBudsServiceAuthTypeOnDeviceVoiceAssistantडिवाइस Voice Assistant
Swift
guard let device = device as? DeviceServiceAuthAPI else { return }
device.retryServiceAuth(.starBurst) { success, error in
    if !success { print(error?.localizedDescription ?? "Authorization retry failed") }
}

Completion बताता है कि retry request accepted हुआ या fail। Service को authorized मानने से पहले updated authorization state पढ़ें या SDK authorization callbacks संभालें।