How to get today’s exact day and 1 day ago ?

Hey,
Joda Time library provides us almost every situation of date-time components.
Firstly, add this library to your :
// Joda Time
compile 'net.danlew:android.joda:2.9.5.1'
Markdown:
// Get the today's time as start of the day : 06:00:00
DateTime startTime = new DateTime().withHourOfDay(6).withMinuteOfHour(0).withSecondOfMinute(0);
Gist:
// Get the today's time as start of the day : 06:00:00
DateTime startTime = new DateTime().withHourOfDay(6).withMinuteOfHour(0).withSecondOfMinute(0);

How to extract filename from Uri?

Now, we can extract filename with and without extension :) You will convert your bitmap to uri and get the real path of your file. Now w...