• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

The right algorithm for a dynamicaly image showing photo album application

 
anil cinar
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm building a photo album application for android. The app simply shows 50 photos on the main screen and when a user clicks on one of them, the profile screen of the photo owner is opened.

If the user X is not subscriber of the user Y, he/she sees user Y's photos as locked (blurred with a lock image).

For this purpose, I keep two versions of a photo as blurred and original on server's disk and when the main screen is loading, the app decides and generates a proper link to get the proper photo from server.

For example if user X is not subscriber of user Y, its photo link is generated as : http://myserver.com/images/locked/2415.jpg

Otherwise, it is generated as :
http://myserver.com/images/public/2415.jpg

The link generation is performed by checking each photo owners whether the app user is subscriber to them or not.

Letting the logical work to the client side is a correct approach ?

Or, should I put an imageurl field to the photo object and the app would only be reponsible for calling the getImageURL() method? However, in this case I should keep imageURL fields for each user to another differently. In other words, there wouldn't be a single imageURL field for a photo on my database.

What would be the right algorithm?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic