Google Sign-in From Fragment Is Not Returned To The App
The problem is Google Sign-In from Fragment closes the app and never calls onActivityResult both Fragment or parent Activity. When I start signInIntent as described in example from
Solution 1:
The issue was of Intent.FLAG_ACTIVITY_NO_HISTORY used in intent to launch the second Activity (parent of Fragment) from login Activity. Also, you can call signInIntent from Fragment and get onActivityResult there (you don't need call this intent from Activity).
Solution 2:
onActivityResult is called in you activity, add smth like this in your activity
@OverridepublicvoidonActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
Fragmentfragment= getSupportFragmentManager().findFragmentById(R.id.container);
fragment.onActivityResult(requestCode, resultCode, data);
}
and overide onActivityResult in your fragment
Post a Comment for "Google Sign-in From Fragment Is Not Returned To The App"