Developing an application in which Firebase is used as a backend. He is currently stuck during the implementation of the Firebase App Invite. Just looking at sending invitations (currently not trying to implement a click on a dynamic link by a new user), but onActivityResult returns an invalid result_code
Steps followed
- Integrated FireBase SDK and successful authentication.
- Firebase enabled dynamic link and mentioned in app
- Pressing the invitation button shows the built-in Firebase activity with the ability to select users to invite and send (SMS or Email Invites).
- The application will return to the invitation screen as expected.
Code snippet
InviteActivity
btnInvite.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent = new AppInviteInvitation.IntentBuilder(INVITATION_TITLE) .setMessage(INVITATION_MESSAGE) .setDeepLink(Uri.parse("https://ewyc6.app.goo.gl/eNh4")) .setCallToActionText(INVITATION_CALL_TO_ACTION) .build(); startActivityForResult(intent, REQUEST_INVITE); } }); @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); Log.d(TAG, "onActivityResult: requestCode=" + requestCode + ", resultCode=" + resultCode + "result_ok ="+RESULT_OK); if (requestCode == REQUEST_INVITE) { if (resultCode == RESULT_OK) {
// result_code is 3, and RESULT_OK is -1 when debugging
New to Firebase, it would be appreciated if I indicated what I was doing wrong.
source share