Saving Json Data Into Sqlite
Hi i need to save json data in sqlite. But iam getting following error. Can't create handler inside thread that has not called Looper.prepare(). This is my code. It is shwoing
Solution 1:
This error is due to Toast
inside doInBackground(Void... arg0)
method:
Toast.makeText(getBaseContext(),"Data saved",Toast.LENGTH_LONG).show();
Clearly the Android OS wont let threads other than the main thread change UI elements. Follow this link for more details on this: https://dzone.com/articles/android-%E2%80%93-multithreading-ui
Post a Comment for "Saving Json Data Into Sqlite"