Lova – Java 8 functional interface for AsyncTask on Android

I call the class Lova – in Swedish “to promise something” is “att lova något” .

This assumes you have converted your Android project to compile with Jack.

Warning: Lambdas do not currently work with multidex! See issue 226867.

This implementation only supports a single input parameter to the background task, but it the doInBackground method could easily be changed to send the full array instead.

If you need to report progress or handle cancellation of the AsyncTask, this implementation is too simple.

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *