我正在设计一个应用程序,使用谷歌应用程序邀请系统。我想要做的是获得发送邀请函的人的电子邮件。
也就是说,User1发送邀请> User2安装应用>活动说“你在哪里被User1@gmail.com邀请”
到目前为止,我已经实现了Google Tutorial,它工作得很好,允许人们邀请其他人安装应用程序。
我假设必须对此进行更改,但我不确定。
@Override
public void onReceive(Context context, Intent intent) {
// Create deep link intent with correct action and add play store referral information
Intent deepLinkIntent = AppInviteReferral.addPlayStoreReferrerToIntent(intent,
new Intent(context.getString(R.string.action_deep_link)));
// Let any listeners know about the change
LocalBroadcastManager.getInstance(context).sendBroadcast(deepLinkIntent);
}发布于 2015-11-04 19:38:20
我们可以像这样获得GMail id:
try {
AccountManager accountManager = AccountManager.get(context);
Account account = getAccount(accountManager);
if (account == null) {
return "";
} else {
return account.name;
}
} catch (Exception ex) {
return "";
}https://stackoverflow.com/questions/32514016
复制相似问题