How to get last seen using asmack 4.0.5 in android

I am using asmack 4.0.5 and want to retreive last seen of a users .I tried using

LastActivityManager lActivityManager = LastActivityManager`` .getInstanceFor(mConnection);

try { 
Log.v(TAG, "Last Activity: " + lActivityManager.getLastActivity(pArg0.getFrom()));
} catch (NoResponseException e)
 {  e.printStackTrace(); }
catch (XMPPErrorException e)
 {  e.printStackTrace(); }
 catch (NotConnectedException e)
{  e.printStackTrace(); }