Android — How does Google+ instant upload work?

前端 未结 2 1281
日久生厌
日久生厌 2020-12-13 21:34

I was playing around with the new Google+ application on the Android and I had a technical question that I couldn\'t seem to find online. How does the instant upload hook in

相关标签:
2条回答
  • 2020-12-13 22:13

    Not entirely sure exactly how Google+ does it, but one way that would work is to use the ContentObserver interface: grab the MediaStore.Images.Media ContentProvider and attach a ContentObserver to it. Anytime a camera image is added, you'll get a notification and you can process it accordingly (including uploading).

    Same technique would work for just about any ContentProvider that properly handles ContentObservers (which I'm assuming is all ContentProviders, but you never can tell).

    0 讨论(0)
  • 2020-12-13 22:20

    Thanks to Femi's answer in this post, I was able to take what he said and figure out how to emulate Google+'s Instant Upload feature. I wrote a tutorial about it here:

    http://www.jessechen.net/blog/how-does-google-plus-instant-upload-work/

    0 讨论(0)
提交回复
热议问题