0
我正在开发与Android版Life360相同的即时消息应用程序。谁能告诉我如何发送邀请给联系人列表中的朋友来安装应用程序?在Android中创建即时消息传递应用程序
我正在开发与Android版Life360相同的即时消息应用程序。谁能告诉我如何发送邀请给联系人列表中的朋友来安装应用程序?在Android中创建即时消息传递应用程序
如果您的应用程序在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