[英]Android - Is there a way to specify a location when sharing into Google+ app?
[英]Google+ app showing wrong pictures when sharing through Android
我已通过编程方式将Google+共享添加到了我的应用中。 我的帖子中包含一组照片,并与以下代码共享:
private void shareToGooglePlus() {
// Launch the Google+ share dialog with attribution to your app.
PlusShare.Builder share = new PlusShare.Builder(this);
for (String imageFilename : imageList) {
Uri imageUri = Uri.fromFile(new File(imageFilename));
share.addStream(imageUri);
}
share.setText("My images");
share.setType("image/jpeg");
startActivityForResult(share.getIntent(), 0);
}
执行此代码后,手机上的Google+应用将启动,并且预览显示的图片和文字符合预期。
但是,如果我多次运行此图像,并在以后的运行中包含不同的图像,则原始图像将显示在Google+帖子预览中,而不是新图像。 如果我提交该帖子,则正确的图像会显示在该帖子中-新的而不是原始的。
我认为Google+应用程序具有某种缓存机制。 是否可以通过编程方式清除该缓存,以便在Google+应用发布后预览中显示正确的图像?
提前感谢。
尝试在每次运行时为源文件分配不同的随机名称(通过重命名或复制)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.