1

I have an activity which opens a photo picker and crops it. Sometimes I get this error.

java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=9162, result=-1, data=Intent { dat=content://media/external/images/media/22113 flg=0x1 }} to activity 

This is my onActicvityResult(),

if (requestCode == Crop.REQUEST_PICK && resultCode == RESULT_OK) {
                beginCrop(result.getData());
            } else if (requestCode == Crop.REQUEST_CROP) {
                handleCrop(resultCode, result);
            }

I want to know what does "who=null" mean? How can I prevent the crash?

Aritra Roy
  • 15,355
  • 10
  • 73
  • 107
  • 1
    You may be missing a parameter when calling an action through intent. Can you please share the code you have written for calling the intent? – kapil thadani May 07 '15 at 07:05
  • 1
    @kapilthadani Actually I am using a library for this. And this is what I am doing, new Crop(source).output(outputUri).asSquare().start(this); – Aritra Roy May 07 '15 at 07:08
  • 1
    maybe it's helpful to you.http://stackoverflow.com/questions/8373755/java-lang-runtimeexception-failure-delivering-result-resultinfowho-null-reque – BinGoBinBin May 07 '15 at 07:10
  • 1
    In your else if condition, add a condition for result==RESULT_OK. Because your handle crop method is getting executed even if result is cancelled! – kapil thadani May 07 '15 at 07:15
  • Any idea, what "who=null" means? – Aritra Roy May 07 '15 at 08:41

0 Answers0