I my case it was because of goAsync(). If you take resultCode before goAsync() call it contains RESULT_OK. But if you take if after goAsync() call it contains 0