I am looking for an easiest way to get call duration of last dialed number. So for e.g if I have made a call to my mom once I cut the call a notification with the duration s
You need to use limit clause in your content query to get the last call details. So your content query will become
Cursor cur = getContentResolver().query( CallLog.Calls.CONTENT_URI, null, null, null, android.provider.CallLog.Calls.DATE + " DESC limit 1;");