0

我正在为 Android 开发一个与 Life360 相同的即时消息应用程序。谁能告诉我如何向联系人列表中的朋友发送安装应用程序的邀请?

4

1 回答 1

0

如果您的应用程序在 Play 商店或已经托管在某个地方,只需创建一个字符串,其中包含您要发送的消息以及 Play 商店或您的 apk 的链接。

这是显示类似内容的代码

在此处输入图像描述

Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT, "This is my text to send.");
sendIntent.setType("text/plain");
startActivity(Intent.createChooser(sendIntent, getResources().getText(R.string.send_to)));

更多信息:http: //developer.android.com/training/sharing/send.html

于 2013-10-04T05:52:28.207 回答