Using my application i uploaded some images to server, next time while i open that application and trying to select images using that same application, how can i indicate the already uploaded images?
Asked
Active
Viewed 63 times
-1
1 Answers
0
The easiest way would be creating a local database and adding flags for those uploaded contents.
The database schema could be like this,
Now each time you upload a content, Make the following queries,
If content name exists in database file_name & is_uploaded status = true, the file was already uploaded.
Else, create a new record for the file in database and upload.
If you have a list of images to show if they were uploaded, run and loop and change the uploaded indicator based on the database is_uploaded flag.

Prokash Sarkar
- 11,723
- 1
- 37
- 50
-
What if the file was deleted or renamed on the server? – OneCricketeer Aug 08 '16 at 07:27
-
The question was not how to remember those image names. The question was how to indicate those images the next time in the gallery app. – greenapps Aug 08 '16 at 07:32
-
@greenapps In order to keep track of the uploaded files you have to uniquely identify them. The unique identification could be the file path, the name, or timestamp. Once they are identified, we can use any visual indicator. – Prokash Sarkar Aug 08 '16 at 07:50
-
@cricket_007 Yes, that's a limitation. Even though Google's "Photos" app re-uploads if you make any changes to the file name or duplicate them. To make the result 100% accurate we may have to go for image processing stuff. – Prokash Sarkar Aug 08 '16 at 07:56
-
`we can use any visual indicator`. Well please tell which one and how to do that in the gallery app as that was the problem. Not remembering some names.. You are again not tackling the problem itself. – greenapps Aug 08 '16 at 08:34
-
@Prokash Sarkar: Thank you for your answer, can u suggest some tutorial for impliment this thigs – Aswanth R CHANDRAN Aug 08 '16 at 08:55
-
@crciket_007: before i asking this question i also have same doubt, So in my case i just ignored that situation, – Aswanth R CHANDRAN Aug 08 '16 at 08:55
-
@AswanthRCHANDRAN check the tutorial here, http://programmerguru.com/android-tutorial/how-to-sync-sqlite-on-android-to-mysql-db/. It's not the exact same solution you are looking for but will give you an idea of tracking uploaded files status. – Prokash Sarkar Aug 08 '16 at 09:01