[android] How to get the result of OnPostExecute() to main activity because AsyncTask is a separate class?

You need to use "protocols" to delegate or provide data to the AsynTask.

Delegates and Data Sources

A delegate is an object that acts on behalf of, or in coordination with, another object when that object encounters an event in a program. (Apple definition)

protocols are interfaces that define some methods to delegate some behaviors.

Here is a complete example!!!