首页 > 解决方案 > 在邀请分享 url 到社交媒体渠道时,应用程序从最近打开/正在运行的应用程序列表中移开

问题描述

请在下面找到代码:

if (pos == 4) {
Intent sendIntent = new Intent();

sendIntent.setAction(Intent.ACTION_SEND);

sendIntent.putExtra(Intent.EXTRA_TEXT, "Check out the App at: https://play.google.com/store/apps/details?id=" + R.string.app_name);
sendIntent.setType("text/plain");
getActivity().startActivity(sendIntent);

Toast.makeText(getActivity(), "INVITE & EARN", Toast.LENGTH_SHORT).show();

}

标签: androidandroid-toastinvite

解决方案


推荐阅读