アンドロイドの新人です..アンドロイドにスレッドを実装しようとしています。しかし、エラーが発生しています..グーグルで「AsyncTask」という回答を得ましたが、本当に実装方法がわかりません
エラーメッセージ
java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
私のコード
final Thread thread = new Thread(){
@Override
public void run() {
try {
DatabaseHandler dbh = new DatabaseHandler(test.this);
result=dbh.Verify(1);
if(result != ""){
getData();
progress.dismiss();
}
else{
}
} catch (Exception e) {
e.printStackTrace();
}
}
};
thread.start();