Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit aaa0d38

Browse files
This would fix the issue #1222 with deprecated currentContext #1223
1 parent 83e239b commit aaa0d38

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/firebase.android.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,8 +1113,7 @@ firebase.login = arg => {
11131113
.build();
11141114

11151115
const signInIntent = com.google.android.gms.auth.api.Auth.GoogleSignInApi.getSignInIntent(firebase._mGoogleApiClient);
1116-
1117-
appModule.android.context.startActivityForResult(signInIntent, GOOGLE_SIGNIN_INTENT_ID);
1116+
(appModule.android.foregroundActivity || appModule.android.startActivity).startActivityForResult(signInIntent, GOOGLE_SIGNIN_INTENT_ID);
11181117

11191118
const callback = (eventData: AndroidActivityResultEventData) => {
11201119
if (eventData.requestCode === GOOGLE_SIGNIN_INTENT_ID) {
@@ -2038,7 +2037,7 @@ firebase.invites.sendInvitation = arg => {
20382037

20392038
const firebaseInviteIntent = builder.build();
20402039

2041-
appModule.android.foregroundActivity.startActivityForResult(firebaseInviteIntent, REQUEST_INVITE_INTENT_ID);
2040+
(appModule.android.foregroundActivity || appModule.android.startActivity).startActivityForResult(firebaseInviteIntent, REQUEST_INVITE_INTENT_ID);
20422041

20432042
const callback = (eventData: AndroidActivityResultEventData) => {
20442043
if (eventData.requestCode === REQUEST_INVITE_INTENT_ID) {

0 commit comments

Comments
 (0)