【发布时间】:2022-09-26 18:23:00
【问题描述】:
我想做一个可以分享的活动。当用户单击该链接而不是应用程序的主页时,会打开特定的活动,但我不知道如何创建它。 我这样做是为了共享应用程序链接,但想将其更改为打开特定活动(活动名称:DifferentialScreen)。
Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);
sharingIntent.setType(\"text/plain\");
shareBody = \"https://play.google.com/store/apps/details?id=com.project.clientdesignDifferentScreen\";
sharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, \"Subject Here\");
sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, shareBody);
startActivity(Intent.createChooser(sharingIntent, \"Share via\"));
标签: java android android-intent share