คลาส GNSMessageManagerParams
พารามิเตอร์เพิ่มเติมสำหรับเครื่องมือจัดการข้อความ
รับค่า NSObject
- (BOOL) showBluetoothPowerAlert |
|
readwritenonatomicassign |
แสดงการแจ้งเตือนของระบบเมื่อบลูทูธปิดอยู่ ค่าเริ่มต้นคือ "ใช่"
- (GNSErrorStateHandler) microphonePermissionErrorHandler |
|
readwritenonatomiccopy |
ระบบจะเรียกใช้เครื่องจัดการข้อผิดพลาดต่อไปนี้ (ในเทรดหลัก) เมื่อสถานะของข้อผิดพลาดเปลี่ยนแปลง
ค่า YES หมายความว่าเป็นข้อผิดพลาด สิทธิ์เข้าถึงไมโครโฟนถูกปฏิเสธ
- (GNSErrorStateHandler) bluetoothPermissionErrorHandler |
|
readwritenonatomiccopy |
สิทธิ์เข้าถึงบลูทูธถูกปฏิเสธ
- (GNSErrorStateHandler) bluetoothPowerErrorHandler |
|
readwritenonatomiccopy |
- (BOOL) useBestAudioSessionCategory |
|
readwritenonatomicassign |
พารามิเตอร์นี้จะเกี่ยวข้องเฉพาะในกรณีที่แอปของคุณใช้สื่อเสียงเพื่อการค้นพบ
เมื่อตั้งค่าเป็น "ใช่" Nearby จะตั้งค่าหมวดหมู่ AVAudioSession และตัวเลือกเป็นค่าที่เหมาะกับใกล้เคียงที่สุด: AVAudioSessionCategoryPlayAndrecord และ AVAudioSessionCategoryOptionDefaultToSpeaker ตามลำดับ ถ้าคุณตั้งค่าเป็น ไม่ หมวดหมู่และตัวเลือกปัจจุบันจะได้รับการเก็บรักษาและใช้โดยฟีเจอร์ใกล้เคียง ซึ่งอาจส่งผลให้ใช้งานใกล้เคียงในการออกอากาศหรือบันทึกเสียงไม่ได้ ตัวอย่างเช่น หากแอปใช้ AVAudioSessionCategoryAmbient แอป Nearby อาจไม่สามารถฟังเสียงจากอุปกรณ์ที่อยู่ใกล้เคียงได้ หากแอปของคุณใช้ AVAudioSessionCategoryrecord แล้ว Nearby จะไม่สามารถประกาศเสียงไปยังอุปกรณ์ที่อยู่ใกล้เคียงได้ ค่าเริ่มต้นคือ "ใช่"
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2023-12-02 UTC
[null,null,["อัปเดตล่าสุด 2023-12-02 UTC"],[[["`GNSMessageManagerParams` provides additional parameters for managing Nearby Messages."],["It includes properties to control system alerts for Bluetooth, handle errors related to microphone/Bluetooth permissions and power, and optimize audio sessions for discovery."],["By default, the system alert for Bluetooth power is shown and Nearby attempts to use the best audio session configuration for discovery."],["Error handlers can be set to respond to microphone and Bluetooth permission or power issues."]]],[]]