These 5 lines can be:
`jsData.put("error", getResultCode() == Activity.RESULT_OK);`