I have created a new thread
inside the onPostExecute method from the Async class. The thing is I want to return the value formed inside the thread. However, outside of the thread in the onPostExecute method, the value is not recognised. I want to call a method that returns the polylines, but without the value from the thread, I can't make it work. Also when I try to call the method inside the thread it gives an error : com.google.maps.api.android.lib6.common.apiexception.c: Not on the main thread
. So I guess if I get the value from the thread and use it outside it won't give the error anymore and I will be able to finish my work.