named-data-mobile / ndn-photo-app

NDN Photo and File Sharing Application (npChat)
https://redmine.named-data.net/projects/npchat/issues
Other
27 stars 24 forks source link

Picture selection #163

Closed dev-ritik closed 5 years ago

dev-ritik commented 5 years ago

Add a received file browser.

It enlists all the files in the m_rcvdFilesDir and m_rcvdPhotosDir in the order they were last modified. On clicking each item, it opens them via other respective apps. An image is added below. Screenshot_20190726-141718

jrandallclark commented 5 years ago

Pictures shared with "Share pictures" shouldn't appear under the "See Photos" part of the app.

jrandallclark commented 5 years ago

Similarly, pictures taken with "Camera" in the app shouldn't appear under "browse rcvd."

dev-ritik commented 5 years ago

@jrandallclark PTAL.

jrandallclark commented 5 years ago

One problem that we need to consider is what happens when a user tries to share the same file more than once. Right now we use the filename as the unique key in the file info, but we'll need to use something else. If you share the same file a second time, the database throws an exception. One idea I've considered is adding a timestamp to the interest name and file info.

@agawande @dev-ritik Do you have any ideas?

jrandallclark commented 5 years ago

@dev-ritik Dr. Wang came up with a simple solution. When we share a file, we should check for it in the database, if it exists, we should use the same symmetric key to encrypt it as we had before.

dev-ritik commented 5 years ago

Yup ok! I will change it accordingly.