1
A
回答
0
您可以使用下面的代码
String type = "video/*";
String filename = "/myVideo.mp4";
String mediaPath = Environment.getExternalStorageDirectory() + filename;
createInstagramIntent(type, mediaPath);
private void createInstagramIntent(String type, String mediaPath){
// Create the new Intent using the 'Send' action.
Intent share = new Intent(Intent.ACTION_SEND);
// Set the MIME type
share.setType(type);
// Create the URI from the media
File media = new File(mediaPath);
Uri uri = Uri.fromFile(media);
// Add the URI to the Intent.
share.putExtra(Intent.EXTRA_STREAM, uri);
share.putExtra(Intent.EXTRA_STREAM, [URI of photo]);
share.putExtra(Intent.EXTRA_TEXT, [Text of caption]);
// Broadcast the Intent.
startActivity(Intent.createChooser(share, "Share to"));
}
相关问题
- 1. 活动 - 意图发送信息到MainActivity
- 2. Tweetsharp直接发送消息
- 3. 发送Facebook直接消息
- 4. 发送图像信息到接收器
- 5. 发送和接收信息
- 6. 如何使用Twitter发送直接信息?
- 7. 如何通过直连线连接器发送用户信息
- 8. 使用curl发送Twitter直接消息
- 9. TweetSharp - TwitterService直接发送消息
- 10. 用smtplib发送空信息
- 11. 用于发送消息信息的Postfix API /查找表
- 12. Android发送短信意图是什么?
- 13. JAVA通过json发送/接收信息
- 14. 发送消息的意见
- 15. Android应用程序开发 - 直接发送电子邮件没有意图
- 16. 短信发送接收器没有收到意图
- 17. 如何将意图发送到短信接收器?
- 18. 用于发送短信的短信不
- 19. 从直接图像找到instagram页面
- 20. 意向发送短信
- 21. 发送消息时接收到什么意图操作?
- 22. Instagram Api评论信息
- 23. ACTION_SEND用于发送短信
- 24. 直接通过从不同的Azure角色扩展发送信号消息
- 25. 发送相同的信息到不同的意见cakePHP
- 26. 发送消息从Android应用程序直接向PHONENUMBER Viber的
- 27. 您可以直接在cURL中发送短信/短信吗?
- 28. Android:连接到网站,身份验证,发送信息,接收信息
- 29. 消息发送到释放实例,同时使用UIDocumentInteractionController的Instagram
- 30. Slack和Instagram直接整合