I can use AsyncTask as an inner class to get the returned result then assign it to the global String var.
But now my idea is to use the AsyncTask like this. My caller method and MyAsyncTask
class are different classes:
//in my caller class
String returned_string = new MyAsyncTask().execute(myparams); //The MyAsyncTask class returns the string after it's done everything.
Log.v("RETURNED STRING",returned_string); //Check if the returned string is correct
But of course it cannot be done because they are in different type.
I don't know if my idea is possible?
Thank you for your time.