Asynctask

asynctask.png
new AsyncTask<String, Integer, Long>() {
                    @Override
                    protected Long doInBackground(String... params) {
                        //java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
                        //を避けたい処理
                        return null;
                    }
                };

handler

サポートサイト Wikidot.com handler