-1

I have this in my Logcat:

threadid=1 thread exiting with uncaught exception FATAL EXCENPTION : main

In fact i used a thread to send a http request and a UI thread.

MaVRoSCy
  • 17,747
  • 15
  • 82
  • 125
johnnyBeGood
  • 69
  • 1
  • 8

1 Answers1

1

Android implements only single thread environments. So if you try to communicate main thread from any separated thread from main UI thread this kind of error is obvious thing. you can use asynctask to do this

Krishna
  • 51
  • 5
  • I have a problem if i want to use Async task. In fact i recovered a geo position with onLocationChanged, and i want to send the longitude and latitude with http request to google and add the response in an Edittext.How can i send arguments to my AsyncTask class? on the doInBackground() method? – johnnyBeGood Jun 27 '13 at 07:40
  • @johnnyBeGood you can do it as , [This Example Answer](http://stackoverflow.com/questions/4195609/passing-arguments-to-asynctask-and-returning-results) and [This Explained Answer](http://stackoverflow.com/questions/6053602/what-arguments-are-passed-into-asynctaskarg1-arg2-arg3) – MKJParekh Jun 27 '13 at 09:12