java - This application may be doing too much work in its main thread -
i using following piece of code add item mysql database.when button clicked,it should begin async task uploads data server.but when run error message "this application may doing work in main thread" logcat.how can fix code problem,thanks. public class newproductactivity extends activity { // progress dialog private progressdialog pdialog; jsonparser jsonparser = new jsonparser(); edittext inputname; edittext inputprice; edittext inputdesc; // url create new product private static string url_create_product = "http://localhost/android_connect/create_product.php"; // json node names private static final string tag_success = "success"; @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.add_product); // edit text inputname = (edittext) findviewbyid(r.id.inputname); inputprice = (edittext) findviewbyid(r.id.inputprice); inputdesc = (edittext) findviewbyid(r.i...