I know that this type of question is already asked but it is not working for me so please tell me how to get the below code working:
if (a1!= null && a2!= null && message != null) {
if (intent!= null) {
Thread.sleep(5000)
ChangePicAsyncTask(context, message).execute(a1, a2) //Error line
}
}
Here "message" is the declared as private var class level nullable variable. Below line "Thread.sleeep(..)" it shows that error. I tried to put an if check but its also not working so please give some suggestions how can i solve this error.