Separate thread required by Android.