app / sg.edu.ntu.scse.cz2006.gymbuddies.tasks / UpdateCarparkAvailabilityService

UpdateCarparkAvailabilityService

class UpdateCarparkAvailabilityService : IntentService

Internal IntentService for updating carpark availability for sg.edu.ntu.scse.cz2006.gymbuddies.tasks in Gym Buddies!

Author
Kenneth Soh

Since
2019-10-22

Constructors

<init>

Internal IntentService for updating carpark availability for sg.edu.ntu.scse.cz2006.gymbuddies.tasks in Gym Buddies!

UpdateCarparkAvailabilityService()

Functions

isInternetAvailable

Checks if there is internet connection

fun isInternetAvailable(): Boolean

onCreate

Internal lifecycle function called when the service is started

fun onCreate(): Unit

onDestroy

Internal lifecycle function called when the service is destroyed

fun onDestroy(): Unit

onHandleIntent

Internal function that invokes when the service starts with an intent being passed in

fun onHandleIntent(intent: Intent?): Unit

Companion Object Properties

LTA_URL

LTA API URL

const val LTA_URL: String

TAG

Internal TAG object

const val TAG: String

TIMEOUT

HTTP Timeout value

const val TIMEOUT: Int

Companion Object Functions

updateCarpark

Function used to start the service to update carpark availability data

fun updateCarpark(context: Context): Unit