Here is my example code:
package newslab.video.server; import android.app.Activity; import android.hardware.Camera; import android.os.Bundle; import android
If you are using android 10 or later don't forget to add this in your manifest file
android:requestLegacyExternalStorage="true" android:grantUriPermissions="true"