in.trainman.book.trainmanbookingsdk.TrainmanBookingSDK.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of trainman-booking-sdk
Show all versions of trainman-booking-sdk
A complete train booking sdk for android by Trainman.
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
}
}