setup

fun setup(context: Context, fairmaticConfiguration: FairmaticConfiguration, fairmaticTripNotification: FairmaticTripNotification, fairmaticOperationCallback: FairmaticOperationCallback?)

Setup the Fairmatic SDK with a configuration. The application should call this method before anything else in the Fairmatic SDK. This API should should be called in onCreate() method of application class. If you don't have an application class, you should create one and specify it in your AndroidManifest.xml file. Calling this method multiple times with the same 'sdkKey' and 'driverId' in the com.fairmatic.sdk.classes.FairmaticConfiguration is a no-op. Once setup finishes, the com.fairmatic.sdk.classes.FairmaticOperationCallback is called (if provided) with the result of the setup operation. Callback is made on the Main Thread.

Parameters

context
  • is the context object of the enclosing application.

fairmaticConfiguration
  • The configuration properties to setup the Fairmatic SDK. Cannot be null.

fairmaticTripNotification
  • The trip notification object to be used by the Fairmatic SDK. Cannot be null.

fairmaticOperationCallback
  • The callback to be invoked after setup. This can be null if no callback is desired by the application.