|
|
|
|
@ -5,7 +5,6 @@ import android.app.Activity |
|
|
|
|
import android.content.Intent |
|
|
|
|
import android.content.pm.PackageManager |
|
|
|
|
import android.graphics.Bitmap |
|
|
|
|
import android.net.Uri |
|
|
|
|
import android.provider.MediaStore |
|
|
|
|
import androidx.core.app.ActivityCompat |
|
|
|
|
import androidx.core.content.ContextCompat |
|
|
|
|
@ -144,13 +143,15 @@ open class MediaActivity : PokerAnalyticsActivity() { |
|
|
|
|
*/ |
|
|
|
|
fun openImageCaptureIntent(multiplePictures: Boolean) { |
|
|
|
|
|
|
|
|
|
tempFile = null |
|
|
|
|
|
|
|
|
|
this.mCurrentPhotoPath = null |
|
|
|
|
this.multiplePictures = multiplePictures |
|
|
|
|
|
|
|
|
|
// Test if we have the permission |
|
|
|
|
if (ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) { |
|
|
|
|
selectedChoice = 0 |
|
|
|
|
askForCameraPermission() |
|
|
|
|
selectedChoice = SELECTED_CHOICE_TAKE_PICTURE |
|
|
|
|
askForStoragePermission() |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -184,6 +185,8 @@ open class MediaActivity : PokerAnalyticsActivity() { |
|
|
|
|
*/ |
|
|
|
|
fun openImageGalleryIntent(multiplePictures: Boolean) { |
|
|
|
|
|
|
|
|
|
tempFile = null |
|
|
|
|
|
|
|
|
|
this.multiplePictures = multiplePictures |
|
|
|
|
|
|
|
|
|
// Test if we have the permission |
|
|
|
|
|