-
Notifications
You must be signed in to change notification settings - Fork 0
Tools selection guide 2.x
The BandyerSDK allows you to selectively enable or disable some of the call tools it provides. At the moment only the whiteboard and the filesharing tools can be enabled or disabled. This guide is meant for clients of the 2.0 version, if you are using a 1.x version take a look at this guide instead.
Coming soon...
In order to opt-out the whiteboard tool, you must provide a WhiteboardToolConfiguration configuration object to the Config object provided during the BandyerSDK initialisation. The WhiteboardToolConfiguration provides two factory methods, you can use to disable or enable the whiteboard tool. The disabled factory method, disables the whiteboard tool altogether, whereas the enabledWithUploadEnabled: method enables the whiteboard tool and uses the flag provided as argument to enable or disable the file upload tool provided by the Whiteboard. The whiteboard tool is enabled by the default if you don't provide any configuration object.
The following code snippets will show you how you disable the whiteboard tool in your app:
import Bandyer
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
let config = Config()
config.environment = .sandbox
config.whiteboardConfiguration = WhiteboardToolConfiguration.disabled()
BandyerSDK.instance().initialize(withApplicationId: "YOUR APP ID", config: config)
return true
}
}
#import "AppDelegate.h"
#import <Bandyer/Bandyer.h>
@interface AppDelegate ()
@end
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
BDKConfig *config = [BDKConfig new];
config.environment = BDKEnvironment.sandbox;
config.whiteboardConfiguration = [BDKWhiteboardToolConfiguration disabled];
[BandyerSDK.instance initializeWithApplicationId:@"YOUR APP ID" config:config];
return YES;
}
@end
The following code snippets will show you how you can enable the whiteboard tool but disable the whiteboard upload tool:
import Bandyer
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
let config = Config()
config.environment = .sandbox
config.whiteboardConfiguration = WhiteboardToolConfiguration.enabled(withUploadEnabled: false)
BandyerSDK.instance().initialize(withApplicationId: "YOUR APP ID", config: config)
return true
}
}
#import "AppDelegate.h"
#import <Bandyer/Bandyer.h>
@interface AppDelegate ()
@end
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
BDKConfig *config = [BDKConfig new];
config.environment = BDKEnvironment.sandbox;
config.whiteboardConfiguration = [BDKWhiteboardToolConfiguration enabledWithUploadEnabled:NO];
[BandyerSDK.instance initializeWithApplicationId:@"YOUR APP ID" config:config];
return YES;
}
@end
In order to opt-out the filesharing tool, you must provide a FileshareToolConfiguration configuration object to the Config object provided during the BandyerSDK initialisation. The FileshareToolConfiguration provides two factory methods analogous to the WhiteboardToolConfiguration object. The disabled factory method, disables the fileshare tool altogether. The fileshare tool is enabled by the default if you don't provide any configuration object.
The following snippets of code will show you how you can disable the fileshare tool in your app:
import Bandyer
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
let config = Config()
config.environment = .sandbox
config.fileshareConfiguration = FileshareToolConfiguration.disabled()
BandyerSDK.instance().initialize(withApplicationId: "YOUR APP ID", config: config)
return true
}
}
#import "AppDelegate.h"
#import <Bandyer/Bandyer.h>
@interface AppDelegate ()
@end
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
BDKConfig *config = [BDKConfig new];
config.environment = BDKEnvironment.sandbox;
config.fileshareConfiguration = [BDKFileshareToolConfiguration disabled];
[BandyerSDK.instance initializeWithApplicationId:@"YOUR APP ID" config:config];
return YES;
}
@end
Looking for other platforms? Take a look at Android, Flutter, ReactNative, Ionic / Cordova. Anything unclear or inaccurate? Please let us know by submitting an Issue or write us here.