GNSMessageManagerParams Class

GNSMessageManagerParams Class Reference

Overview

Additional parameters for the message manager.

Inherits NSObject.

Property Summary

BOOL showBluetoothPowerAlert
 Show the system alert when Bluetooth is off. Default is YES. More...
 
GNSErrorStateHandler microphonePermissionErrorHandler
 The following error handlers are called (on the main thread) when the status of the error changes. More...
 
GNSErrorStateHandler bluetoothPermissionErrorHandler
 Bluetooth permission is denied. More...
 
GNSErrorStateHandler bluetoothPowerErrorHandler
 Bluetooth is powered off. More...
 
BOOL useBestAudioSessionCategory
 This parameter is relevant only if your app uses the audio medium for discovery. More...
 

Property Detail

- (BOOL) showBluetoothPowerAlert
readwritenonatomicassign

Show the system alert when Bluetooth is off. Default is YES.

- (GNSErrorStateHandler) microphonePermissionErrorHandler
readwritenonatomiccopy

The following error handlers are called (on the main thread) when the status of the error changes.

A value of YES implies an error. Microphone permission is denied.

- (GNSErrorStateHandler) bluetoothPermissionErrorHandler
readwritenonatomiccopy

Bluetooth permission is denied.

- (GNSErrorStateHandler) bluetoothPowerErrorHandler
readwritenonatomiccopy

Bluetooth is powered off.

- (BOOL) useBestAudioSessionCategory
readwritenonatomicassign

This parameter is relevant only if your app uses the audio medium for discovery.

When set to YES, Nearby will set the AVAudioSession category and options to the values that work best for Nearby: AVAudioSessionCategoryPlayAndRecord and AVAudioSessionCategoryOptionDefaultToSpeaker, respectively. If you set it to NO, the current category and options will be preserved and used by Nearby. This may result in the inability for Nearby to broadcast or record audio. For example, if your app uses AVAudioSessionCategoryAmbient, Nearby may not be able to listen to audio from nearby devices. If your app uses AVAudioSessionCategoryRecord, Nearby will not be able to broadcast audio to nearby devices. Default is YES.