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. Android的twitter发送直接信息
- 2. 活动 - 意图发送信息到MainActivity
- 3. 发送Facebook直接消息
- 4. Tweetsharp直接发送消息
- 5. 发送图像信息到接收器
- 6. 发送和接收信息
- 7. 如何通过直连线连接器发送用户信息
- 8. 如何使用Twitter发送直接信息?
- 9. 使用curl发送Twitter直接消息
- 10. 在Twitter上发送关于iOS 7和iOS 8的直接信息
- 11. Twitter4J,直接信息
- 12. 开始短信的意图,发送消息并关闭
- 13. Discord.net发送直接信息(PM)给指挥亚军人
- 14. 使用gen_tcp的消息:直到套接字关闭才发送发送消息
- 15. TweetSharp - TwitterService直接发送消息
- 16. 直接发送消息到订阅
- 17. 从twitter API发送直接消息
- 18. Twitter的直接信息 - iPhone
- 19. NFC意图过滤器 - 发送信息非主要活动
- 20. 用smtplib发送空信息
- 21. 用java发送GCM信息
- 22. Magento用CSV发送信息
- 23. 用于发送消息信息的Postfix API /查找表
- 24. iOS:用于发送图像数据的套接字通信
- 25. Android发送短信意图是什么?
- 26. JAVA通过json发送/接收信息
- 27. 发送消息的意见
- 28. 我如何发送用户信息贤者使用C#,ASP.NET MVC(直接集成)
- 29. posts.so如何直接发布到instagram API
- 30. 沿信息向前发送信息