android - 在邀请分享 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();
}
解决方案
推荐阅读
- php - 在 laravel 5.8 中找不到类 'app\login'
- iphone - 故事板更改未在 iphone 中更新,但可在模拟器上使用
- python - 写入使用 pysftp“open”方法打开的 SFTP 服务器上的文件很慢
- sql - 在 DB2 中使用 DDL 创建数据库用户
- javascript - 我可以从本地 HTML 站点在 MacOS 上运行应用程序吗?
- c# - 如何使用 linq 获取相关数据?
- php - 如何将字符串转换为数组在'='之前作为键,在'='之后作为php数组中的值
- css - Angular Material列宽适合内容?
- javascript - 当我想获取 formData 时 POST 转换为 GET?
- image - 在不丢失透明度的情况下调整 TWICImage 的大小