title: Capture and save image with Kotlin in Android Studio
body: <p>I need help with Kotlin. I need to capture and save an image in my media store.</p>
  
  <p>My code:</p>
  
  <pre><code>class MainActivity : AppCompatActivity() {
      var ListadeProductos = ArrayList&lt;Notas&gt;()
      override fun onCreate(savedInstanceState: Bundle?) {
          super.onCreate(savedInstanceState)
          setContentView(R.layout.activity_main)
  
          camera.setOnClickListener {
  
              val intentCamera = Intent("android.media.action.IMAGE_CAPTURE")
              startActivity(intentCamera)
          }
      }
  }
  </code></pre>