简体   繁体   English

如何发送图像和文本并安装应用程序链接以共享给其他应用程序

[英]how to send image and text and install app link in share to other apps

I am very new to this topic how to share my app along with image and text,play store link,my images and text getting from server and image should be not visible after sharing content ,please any one help me how to share this content to other apps like whats app,twitter and more ....我对这个主题很陌生如何分享我的应用程序以及图像和文本,播放商店链接,我从服务器和图像获取的图像和文本在分享内容后应该不可见,请任何人帮助我如何将此内容分享到其他应用程序,如 whats app、twitter 等......

here below my code在我的代码下面

 File filePath = getFileStreamPath("news_image");
            shareIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            shareIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(filePath));
            shareIntent.setType("image/png");
            shareIntent.putExtra(Intent.EXTRA_TEXT,
                    "Here is my IMAGE");
            startActivity(Intent.createChooser(shareIntent, "Share IMAGE Using..."))

You should follow the advice from android documentation .您应该遵循android 文档中的建议。

Snippet from the page:页面截图:

Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("market://details?id=com.example.android"));
startActivity(intent);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM