Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ushahidi android app v3.9, MAJOR BUG #166

Open
Robzter opened this issue May 1, 2014 · 6 comments
Open

Ushahidi android app v3.9, MAJOR BUG #166

Robzter opened this issue May 1, 2014 · 6 comments
Milestone

Comments

@Robzter
Copy link

Robzter commented May 1, 2014

the server show report with right photo
but at the android app, some photos are repeated or wrong.

when refreshing the images change to repeated or wrong again.. the server is always showing the correct ones.

This is a MAJOR bug and needs to be fixed ASAP please assist with this.

Thanks

@eyedol eyedol added this to the v3.10 milestone May 2, 2014
@alessandronunes
Copy link

Any predictions on when it will be released the new version? Or could @eyedol show some easy fix for this? Thanks!

@alessandronunes
Copy link

I found the problem. On file ReportsApi.java, line 102, the fileName is using the date/time to create the name for the saved photos. It creates a mess, once a lot of pictures are saved on the same second, with the same name.

My fix is just replace the line:

final String fileName = Util.getDateTime() + ".jpg";

By:

String fileName = m.getLinkUrl().substring(m.getLinkUrl().lastIndexOf('/')+1, m.getLinkUrl().length());

Saving the picture with the same name on the server.

@eyedol
Copy link
Collaborator

eyedol commented Nov 27, 2014

@alessandronunes mind sharing a PR?

@alessandronunes
Copy link

PR?

@Rszotak
Copy link
Contributor

Rszotak commented Jan 31, 2015

Will submit push request with change and documentation shortly...

@Rszotak
Copy link
Contributor

Rszotak commented Jan 31, 2015

Pull request committed, changed date time descriptor for file names to specific URL, similar to alessandronunes with the minor difference of making the String final.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants