You are pretty close - just clean-up a few things and you'll be done.
Remove the URL from the
ReadTextTask class and pass it in as an argument in case you want this to be configurable or come from a database later-on. Also, to keep things simple (for now), it might be better just to return the value from the server as a
String, especially if all you are going to do with it is display it in the UI. Finally, since you aren't using
onProgressUpdate, just remove it.
That would leave you with:
Now to call it form your
onCreate method, use your existing code to create the
URL, create a new instance of your class, and then execute it with the URL as the argument.