Get Last Call Duration in android

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;");

Leave a Comment