Open dlackty opened 6 years ago
Same problem
I have another case but which is very similar.
I get OnResult.response
right in the middle of onActivityPaused
for target activity and onActivityResumed
of starter activity.
so, OnResult.response
is ignored and never processed again https://github.com/VictorAlbertos/RxActivityResult/blob/721d059a80c1489672479500c10294d4021f33a2/rx_activity_result/src/main/java/rx_activity_result2/RxActivityResult.java#L122
I have it only for specific devices which are slower than others (Sony TV).
We're trying to integrate this library with Google SignIn, and however subscriber gets no result.
After investigation, we found that there's potential issue for this library. For Google SignIn, they use a
SignInHubActivity
, which presents a dialog then puts itself into pause state. Then when user click on the dialog option, it will set result and finish activity.https://github.com/VictorAlbertos/RxActivityResult/blob/721d059a80c1489672479500c10294d4021f33a2/rx_activity_result/src/main/java/rx_activity_result2/ActivitiesLifecycleCallbacks.java#L37-L39
At this moment,
RxActivityResult.activitiesLifecycle.getLiveActivity()
returnsnull
and thus breaks the expected subscription behavior.Possibly related: #36 Possible fix: use
getOLiveActivity
instead