首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Android - Google App邀请-获取推荐信息

Android - Google App邀请-获取推荐信息
EN

Stack Overflow用户
提问于 2015-09-11 09:16:39
回答 1查看 246关注 0票数 1

我正在设计一个应用程序,使用谷歌应用程序邀请系统。我想要做的是获得发送邀请函的人的电子邮件。

也就是说,User1发送邀请> User2安装应用>活动说“你在哪里被User1@gmail.com邀请”

到目前为止,我已经实现了Google Tutorial,它工作得很好,允许人们邀请其他人安装应用程序。

我假设必须对此进行更改,但我不确定。

代码语言:javascript
复制
@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);
}
EN

回答 1

Stack Overflow用户

发布于 2015-11-04 19:38:20

我们可以像这样获得GMail id:

代码语言:javascript
复制
try {
        AccountManager accountManager = AccountManager.get(context);
        Account account = getAccount(accountManager);
        if (account == null) {
            return "";
        } else {
            return account.name;
        }
    } catch (Exception ex) {
        return "";
    }
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/32514016

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档