title: Is there any way to programmatically determine when an app was last opened?
body: <p>I would like to know when an app (i.e., Facebook or WhatsApp) was last opened.</p>
  
  <p>Without root, is there any way to programmatically determine when an app was last opened in Android? </p>
  
  <p><strong>Important Info:</strong></p>
  
  <p>One issue I have regarding previous suggestions is, if I keep some variation of log then I wouldn't be able to determine when an app was last used if it was used before my Android application was installed.</p>