Google+应用显示了通过Android的共享时出错图片 [英] Google+ app showing wrong pictures when sharing through Android
问题描述
我已经以编程方式添加Google+中分享到我的应用程序。我有一组照片,我包括我的职位,并以下列code分享:
I have programmatically added Google+ sharing to my app. I have a set of photos that I include with my posts and share with the following code:
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);
}
在此code被执行,我的手机上的Google+应用启动时,我得到预期具有图像和文本的preVIEW。
When this code gets executed, the Google+ app on my phone is started and I get a preview that has the images and text as expected.
但是,如果我跑的比这一次更多,包括后续运行中不同的图像,原始图像显示在Google+讯息preVIEW,而不是新的。如果我提交后,正确的图像后显示出来 - 新的,而不是原有的
However, if I run this more than once and include different images on subsequent runs, the original images show up in the Google+ post preview instead of the new ones. If I submit the post, the correct images show up in the post--the new ones, not the original ones.
我presume Google+应用具有某种缓存机制。有没有一种方法以编程方式明确表示缓存,以便正确的图像显示在Google+应用后preVIEW?
I presume the Google+ app has some kind of caching mechanism. Is there a way to programmatically clear that cache so that the correct images show up in the Google+ app post preview?
感谢名单提前。
推荐答案
你为什么不尝试(通过重命名或复制),在每次运行指定不同的随机名字你的源文件?
Why don't you try assigning different random names to you source files (by renaming or copying) on each run?
这篇关于Google+应用显示了通过Android的共享时出错图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!