从AppInvite Google android获取结果

Bal*_*yak 5 android google-app-invites

我在我的Android应用程序中使用Google Appinvite Api向朋友发送邀请.

我能够发送请求及其正常工作.但我想跟踪我通过我的应用程序向其发送请求的朋友.

这是我获得邀请ID的代码.

但是如何从邀请ID中获取发送人姓名或电子邮件.

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);

    if (requestCode == REQUEST_INVITE) {
        if (resultCode == RESULT_OK) {
            String[] ids = AppInviteInvitation.getInvitationIds(resultCode, data);
            Log.d("TAG", getString(R.string.sent_invitations_fmt, ids.length));
        } else {
            showMessage(getString(R.string.send_failed));
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

String [] id是我发送的邀请ID的数组

小智 1

作为应用程序,您无法获取人名和电子邮件列表,只能获取邀请 ID。电子邮件和姓名对于发送邀请的人(即拥有设备和联系人数据的人)来说是私有的,并且该私有信息不会与发送邀请的应用程序共享。