class UpdateGymFavourites : AsyncTask<Void, Void, Void>
Task to handle updating gym favourites when the favourites button is clicked For sg.edu.ntu.scse.cz2006.gymbuddies.tasks in Gym Buddies!
Author
Kenneth Soh
Since
2019-10-02
Callback |
Internal interface to handle callbacks interface Callback |
<init> |
Initializees the task to execute UpdateGymFavourites(activity: Activity, userid: String, gymId: String?, favStatus: Boolean, callback: Callback) |
actRef |
WeakReference<(android.app.Activity..android.app.Activity?)> A weak reference to the activity val actRef: WeakReference<Activity!> |
callback |
Callback Callback to call when task completes val callback: Callback |
favStatus |
Boolean The toggle state (true if we are favouriting, false if you are unfavouriting) val favStatus: Boolean |
gymId |
String? The gym being favourited or unfavourited val gymId: String? |
userid |
String User ID of the user who clicked the button val userid: String |
doInBackground |
Internal task to execute in the background on a seperate thread fun doInBackground(vararg params: Void?): Void? |
TAG |
Activity Tag for logs const val TAG: String |