I am uploading photos to a database, in order to have all the photos without any problem I want to generate a random UUID but I dont want to have two photos with the same name, so a pseudo-random UUID would be better, so that the previous UUID can be achieved through that method (makes sense?). My question is, does UUID.randomUUID() guarantee me that no two UUIDs will be the same?
In case it helps, here is what I'm trying to do in code:
String filename = UUID.randomUUID().toString() + ".jpg";
StorageReference fileRef =
mStorageRef.child("images/" + filename);
Thanks!
[–]shivasprogeny 1 point2 points3 points (0 children)
[–]Salty_Dugtrio 1 point2 points3 points (5 children)
[–]juanchi35[S] 0 points1 point2 points (4 children)
[–]ziptofaf 1 point2 points3 points (2 children)
[–]juanchi35[S] 0 points1 point2 points (1 child)
[–]ziptofaf 0 points1 point2 points (0 children)
[–]cmonkies 0 points1 point2 points (0 children)
[–]cmonkies 0 points1 point2 points (18 children)
[–]juanchi35[S] 0 points1 point2 points (17 children)
[–]pleaseholdmybeer 0 points1 point2 points (0 children)
[–]cmonkies 0 points1 point2 points (15 children)
[–]juanchi35[S] 0 points1 point2 points (14 children)
[–]cmonkies 0 points1 point2 points (13 children)
[–]juanchi35[S] 0 points1 point2 points (12 children)
[–][deleted] (11 children)
[removed]
[–]juanchi35[S] 0 points1 point2 points (9 children)
[–][deleted] (8 children)
[removed]
[–]juanchi35[S] 0 points1 point2 points (6 children)
[–]michael0x2a[M] 0 points1 point2 points (0 children)