All Downloads are FREE. Search and download functionalities are using the official Maven repository.

in.trainman.book.trainmanbookingsdk.TrainmanBookingSDK.kt Maven / Gradle / Ivy

There is a newer version: 2
Show newest version
package `in`.trainman.book.trainmanbookingsdk

import `in`.trainman.book.trainmanbookingsdk.callback.TrainmanBookingListener
import android.app.Activity

object TrainmanBookingSDK {
    var manager: TrainmanBookingManager? = null

    fun init(
        username: String,
        password: String,
        client_token: String,
        app_type : APP_TYPE
    ) {
        if (manager == null)
            manager = TrainmanBookingManager()
        manager?.init(username, password, client_token, app_type)
    }

    fun startBookingFlow(activity: Activity,requestCode : Int, listener: TrainmanBookingListener? = null) {
       manager?.startBookingFlow(activity, requestCode ,listener)
    }

    fun destroy(){
        manager = null
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy