toolkit / com.sas.android.visualanalytics.sdk / SASManager

SASManager

@Singleton class SASManager

Provides the main entry point into SAS Visual Analytics functionality.

Since
8.30

Types

Result

sealed class Result

Encapsulates the result of an attempt to create a connection.

Properties

servers

val servers: List<Server>

Gets all SAS Visual Analytics Servers for which a connection has been established.

Functions

create

fun create(descriptor: ConnectionDescriptor, reports: List<ReportDescriptor>?, onConnectionComplete: (Result) -> Unit = null, onSubscribeComplete: (Result) -> Unit = null): Unit

Creates a connections to a SAS Visual Analytics server.

createFromJson

fun createFromJson(input: Reader, context: Context, onConnectionComplete: (Result) -> Unit = null, onSubscribeComplete: (Result) -> Unit = null): Unit

Creates one or more connections to SAS Visual Analytics servers defined in JSON.

getReport

fun getReport(id: String): Report?

Gets a Report with the defined ID.

openReport

fun openReport(report: Report, startingActivity: FragmentActivity, startSection: String? = null, extras: Bundle? = null): Unit

Performs any required authorization/permission checks, and then opens the given report with the Intent returned from SASManagerContext.viewReportHandler.

remove

fun remove(server: Server): Boolean

Removes the connection associated with the given Server and invalidates the object for future use.

Companion Object Functions

init

fun init(app: Application, sasContext: SASManagerContext): SASManager

Creates and initializes a SASManager for the given SASManagerContext. This should typically be created once and the reference held for the lifetime of the application.

Copyright © 2019 by SAS Institute Inc., Cary, NC, USA. All Rights Reserved.