When you start an android service in activity, the service runs in the activity main thread. If the service is time consuming, then the main thread will be blocked. So […]
Android foreground service is an android service object. But it always run in foreground, this can avoid service object being recycled by android system when android os do not have […]
This example show you how to encapsulate HttpURLConnection and OkHttp in a http util class that can make http request through HttpURLConnection or OkHttp reusable.
This example will tell you how to use org.json.JSONObject and com.google.gson.Gson to parse json string read from a url page.
This example will show you how to use SAXParserFactory and SAXParser to parse a xml file from a url. All above class is included in package javax.xml.parsers
This example show you how to use XmlPullParserFactory and XmlPullParser to parse xml file and show the parsed out data in text view.
This article will tell you how to use OkHttp3 to upload or download json string or file between web server and android application. You can read Android OkHttp3 Http Get Post […]
This example will show you how to use OkHttp3 to send get or post http request to a web server and how to parse and display response text in an […]
This article will tell you how to use java.net.HttpURLConnection class to send http request and get http server response in android application.
In previous article, we have learnt basic concepts about android WebView. This article will provide a WebView example. Please note, it is better to run this example in a real […]