Solved one bug which does not let the calling of onActivityResult be done