title: Listen for app installed / upgraded broadcast message in Android
body: <p>Using Lookout app (https://play.google.com/store/apps/details?id=com.lookout), I see every time I install or upgrade app, it'll automatically scan this app to ensure it's not malicious.</p>
  
  <p>Follow Lookout, I write a simple app which listen broadcast message whenever each app is installed or upgraded. AFAIK, there are some type of IntentFilter for broadcast message, it is:</p>
  
  <ul>
  <li>Intent.ACTION_PACKAGE_ADDED</li>
  <li>Intent.ACTION_PACKAGE_CHANGED</li>
  <li>Intent.ACTION_PACKAGE_INSTALL</li>
  </ul>
  
  <p>I hope <code>Intent.ACTION_PACKAGE_ADDED</code> is the answer but it's wrong (ACTION_PACKAGE_ADDED: A new application package has been installed on the device. The data contains the name of the package. Note that the newly installed package does not receive this broadcast.) while <code>ACTION_PACKAGE_INSTALL</code> is deprecated.</p>
  
  <p>Can anyone tell me a better way? Any help is welcome.</p>