Skip to main content

Posts

Featured

Android IntentService example

The following example is going to be of great help in understanding Android IntentService. In the example  I am going to use an activity and an IntentService. Let's name this activity as MainActivity and IntentService as FileService. In the MainActivity  startFileService method the putExtra parameter has key value pair, where "url" is the key and " http://www.textfiles.com/adventure/221baker.txt " is the value. This url is has a ".txt" file whose text  is set to " TextView txtVw".  And reading the ".txt" file from the url is done in the background using intent service. Before going through the example, let us understand few concepts mentioned below: IntentService : This handles asynchronous requests. Requests are received once the clients send requests through startService(Intent) call. Service is started as needed and each Intent is handled using a worker thread. -onHandleIntent(Intent intent): This method is invoked on ...

Latest posts

AutoComplete TextField ios Objective C

Recyclerview vs Listview android

ANDROID 6.0 MARSHMALLOW VS. ANDROID 5.0 LOLLIPOP