NFC タグをスキャンするときに onNewIntent を使用しています。タグのスキャン中に ProgressDialog を表示したい。スレッドを使用しようとしましたが、アプリがクラッシュしました。onNewIntent の開始時に progressDialog を表示する方法はありますか?
public void onNewIntent(Intent intent) {
setIntent(intent);
Thread scanning = new Thread(new Runnable() {
public void run() {
ScanDialog = ProgressDialog.show(BorrowActivity.this,
"Scanning...", "scanning");
}
});
scanning.start();
.
. //next code doing something
.
}