2

In my application I download video files(.mp4 and .avi) from dropbox folder to folder in sdcard. I need to play file with videoview. How I can check files integrity (equality of files from sdcard and DropBox).

flotothemoon
  • 1,882
  • 2
  • 20
  • 37
Artem Cherkasov
  • 239
  • 4
  • 17

2 Answers2

0

I recommend comparing file checksums. Here is a basic example how to get the MD5 checksum. More detailed examples with other functions can be found here.

Community
  • 1
  • 1
slezadav
  • 6,104
  • 7
  • 40
  • 61
0

The Dropbox API now offers a hash of file data that you can use to verify a file's contents. You can find it in FileMetadata.content_hash. It isn't a single MD5 or SHA1, but rather a combination of SHA256 hashes of the pieces of the file. You can find more information here:

https://www.dropbox.com/developers/reference/content-hash

Greg
  • 16,359
  • 2
  • 34
  • 44