不能把http请求写在主线程里,改为这样

        Runnable runnable = new Runnable() {
            public void run() {
                HttpClient.post2("Notification posted 通知标题: " + "通知内容:");
            }
        };
        new Thread(runnable).start();

 

相关文章: