Package com.teamviewer.sdk.screensharing
Class TeamViewerSdk.Builder
java.lang.Object
com.teamviewer.sdk.screensharing.TeamViewerSdk.Builder
- Enclosing class:
TeamViewerSdk
Builder object for the
TeamViewerSdk
.-
Constructor Summary
ConstructorsConstructorDescriptionBuilder
(android.content.Context context) Creates a builder for theTeamViewerSdk
. -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Creates theTeamViewerSdk
with the arguments supplied to this builder.
Must be called from the main thread.Sets aAccessControlCallback
for listening to access control requests.Sets aAuthenticationCallback
for listening to incoming connection requests.withErrorCallback
(ErrorCallback callback) Sets aErrorCallback
for listening to TeamViewer Sdk errors.withInputCallback
(InputCallback callback) Sets aInputCallback
for listening to input from the remote supporter.withLogger
(Logger callback) Sets aLogger callback
to which all log output from the TeamViewer Sdk is delegated to.withMicInitiallyMuted
(boolean muted) Sets the initial microphone state for the session.withOnlineStateCallback
(OnlineStateCallback callback) Sets aOnlineStateCallback
for listening to online state changes.withSessionCallback
(SessionCallback callback) Sets aSessionCallback
for listening to TeamViewer session events.withSettings
(Settings settings) SetsSettings
which changes the behaviour of the TeamViewer Sdk.withStorageFolder
(String storageFolder) Sets the root path for file transfer Assist AR.Sets the Sdk token which is mandatory to use the TeamViewer Sdk.
-
Constructor Details
-
Builder
public Builder(android.content.Context context) Creates a builder for theTeamViewerSdk
.- Parameters:
context
- The application's context.
-
-
Method Details
-
withToken
Sets the Sdk token which is mandatory to use the TeamViewer Sdk. You can create and manage a token in the TeamViewer Management Console.- Parameters:
token
- The Sdk token to use.- Returns:
- This Builder object to allow for chaining of calls to set methods.
-
withErrorCallback
Sets aErrorCallback
for listening to TeamViewer Sdk errors.- Parameters:
callback
- TheErrorCallback
to use.- Returns:
- This Builder object to allow for chaining of calls to set methods.
-
withAuthenticationCallback
Sets aAuthenticationCallback
for listening to incoming connection requests.- Parameters:
callback
- TheAuthenticationCallback
to use.- Returns:
- This Builder object to allow for chaining of calls to set methods.
-
withSessionCallback
Sets aSessionCallback
for listening to TeamViewer session events.- Parameters:
callback
- TheSessionCallback
to use.- Returns:
- This Builder object to allow for chaining of calls to set methods.
-
withOnlineStateCallback
Sets aOnlineStateCallback
for listening to online state changes.- Parameters:
callback
- TheOnlineStateCallback
to use.- Returns:
- This Builder object to allow for chaining of calls to set methods.
-
withAccessControlCallback
Sets aAccessControlCallback
for listening to access control requests.- Parameters:
callback
- TheAccessControlCallback
to use.- Returns:
- This Builder object to allow for chaining of calls to set methods.
-
withInputCallback
Sets aInputCallback
for listening to input from the remote supporter.- Parameters:
callback
- TheInputCallback
to use.- Returns:
- This Builder object to allow for chaining of calls to set methods.
-
withLogger
Sets aLogger callback
to which all log output from the TeamViewer Sdk is delegated to.- Parameters:
callback
- TheLogger callback
to use.- Returns:
- This Builder object to allow for chaining of calls to set methods.
-
withSettings
SetsSettings
which changes the behaviour of the TeamViewer Sdk.- Parameters:
settings
- TheSettings
to use.- Returns:
- This Builder object to allow for chaining of calls to set methods.
-
withMicInitiallyMuted
Sets the initial microphone state for the session. If not set exclusively, false is set by default.- Parameters:
muted
- The initial state to use.- Returns:
- This Builder object to allow for chaining of calls to set methods.
-
withStorageFolder
Sets the root path for file transfer Assist AR.- Parameters:
storageFolder
- Name of the folder where delivered files will be stored.- Returns:
- This Builder object to allow for chaining of calls to set methods.
This same storageFolder must also be mentioned in FileProvider for app.
Define FileProvider in app manifest with app package as authority like below :
create xml file resource with name fileprovider and mention same folder name in xml as a path<provider android:name="androidx.core.content.FileProvider" android:authorities="your.app.package.fileprovider" android:exported="false" android:grantUriPermissions="true"> <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/fileprovider" /> </provider>
<?xml version="1.0" encoding="utf-8"?> <paths> <!-- External storage path --> <external-files-path name="shared_files" path="storageFolder" /> </paths>
-
build
Creates theTeamViewerSdk
with the arguments supplied to this builder.
Must be called from the main thread.- Returns:
- The
TeamViewerSdk
.
-