Showing posts with label async class. Show all posts
Showing posts with label async class. Show all posts

Thursday, March 5, 2015

Convert date in hours ago or days ago in android

When you see a post it always shows time posted in hours ago or days ago. If you are also kooing to implement the same functionality using Android than use the below method that convert date or time in " hours or days".

//firstly find out difference between current time and other time
 long diff = currentdate.getTime() - temp_date.getTime();


Tuesday, February 24, 2015

Execute multiple asynctask at same time in android

AsyncTask empowers fitting and simple utilization of the UI string. This class permits to perform background operations and show results on the UI thread.

When we use AsyncTasks, than it only execute on a single background thread. Beginning with DONUT, this was changed to a pool of strings permitting numerous tasks to work in parallel. Beginning with HONEYCOMB, assignments are executed on a single string to stay away from regular application errors created by parallel execution.

Don't lose faith when you see others receive answers to their prayers

An elephant and a dog became pregnant at same time. Three months down the line the dog gave birth to six puppies . Six months later the ...

 

G-Expo Template by Ipietoon Cute Blog Design