I am trying to get last offline time of a particular jabberId by this piece of code.
LastActivityManager lActivityManager = LastActivityManager.getInstanceFor(MessageService.getConnection());
lActivityManager.isLastActivitySupported(to + "@localhost");
Log.v(TAG, "Last Activity: " + lActivityManager.getLastActivity(to + "@localhost"));
LastActivity activity = lActivityManager.getLastActivity(to + "@localhost");
But I am keep getting service-unavailable exception. I have checked the server configuration but this feature is implemented correctly from server side.