# HG changeset patch # User David Barts # Date 1614221087 28800 # Node ID eec88eba58e92557b5dc9bc44e7807d6bfcfd1b7 # Parent cf9621e88d2d877dcad8085034b766c6fcd4ad69 Fix receiving from another app. diff -r cf9621e88d2d -r eec88eba58e9 app/src/main/java/com/bartsent/simpleresizer/EditImage.kt --- a/app/src/main/java/com/bartsent/simpleresizer/EditImage.kt Wed Feb 24 13:53:39 2021 -0800 +++ b/app/src/main/java/com/bartsent/simpleresizer/EditImage.kt Wed Feb 24 18:44:47 2021 -0800 @@ -94,8 +94,9 @@ override fun onResume() { super.onResume() + Log.d("EditImage", "intent action = ${intent?.action ?: "(none)"}") // Read the URI, die if we can't. - val imageUri = intent?.data + val imageUri = intent?.data ?: intent?.extras?.get(Intent.EXTRA_STREAM) as? Uri if (imageUri == null) { if (State.bitmap == null) showFatalError(getString(R.string.error_no_uri))