title: How to get broadcast of new media in gallery?
body: <p>I am trying to get notified of a new picture or video added to the phone gallery. I would need to obtain the new media's URI. The purpose is so i can automatically back it up. So i need a register that is set in the background to continuously listen or check for new media added to the gallery, and captures the Uri. This used to be done with a broadcast receiver such as:</p>
  
  <pre><code>&lt;receiver
      android:name=".receivers.CameraEventReceiver"
      android:label="CameraEventReceiver"&gt;
      &lt;intent-filter&gt;
  
          &lt;!-- &lt;action android:name="com.android.camera.NEW_PICTURE" /&gt; --&gt;
          &lt;action android:name="android.hardware.action.NEW_PICTURE" /&gt;
  
          &lt;data android:mimeType="image/*" /&gt;
      &lt;/intent-filter&gt;
  &lt;/receiver&gt;
  </code></pre>
  
  <p>However this was deprecated in API level 24. I target API 21-26. Can someone show me how to do this with JobSchedulers like android docs say too?</p>