Contribute data/ traces to OSM and/ or SD Card

Bug #579399 reported by chris_debian
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenSatNav
Fix Released
Medium
evolvedlight

Bug Description

Add _Contribute data/ traces to OSM and/ or SD Card_ functionality to OSN.

This has been discussed and accepted as a future feature.

Revision history for this message
chris_debian (cjhandrew) wrote :

chris_debian: Unfortunately, I still have to use AndNav for this.

Revision history for this message
chris_debian (cjhandrew) wrote :

I'm very keen for this to be a priority feature, so that when people download from Market, they don't feel (like me) that they have to keep AndNav, purely for the Trace functionality.

Could we target a release for this feature?

Thanks,

Chris.

Revision history for this message
Guillaume Rosaire (zerog) wrote :

chris_debian wrote:
> I'm very keen for this to be a priority feature, so that when people download from Market, they don't feel (like me) that they have to keep AndNav, purely for the Trace functionality.

Same for me, that's the main reason why I'm using Andnav2 (France roads coverage need some work to be usable)

Revision history for this message
chris_debian (cjhandrew) wrote :

Kizza,

Any thoughts on when we could fit this in?

Cheers,

Chris.

Revision history for this message
chris_debian (cjhandrew) wrote :

I considered aiming for 1.0, but thought this would be too much pressure. Happy to aim for different release if suggested.

Chris.

Revision history for this message
evolvedlight (steve-evolvedlight) wrote :

With droidcollector going awol I've been looking for a replacement. Have done quick proof of concept. Need to actually test it though. Will put patches up tomorrow. I like this project though, will try and do more too. My compliments to current developers as code was easy to understand, well written and therefore my code so far is short.
evolvedlight

Revision history for this message
chris_debian (cjhandrew) wrote :

Evolvedlight,

Thanks for your comments. I'm sure the guys will really appreciate your praise. It would be really good if you could help the project. Are you subscribed to the mailing lists? If so, perhaps you could let us know what you have in mind for this contribution.

BTW, how did you manage to get your icon to work; i've been trying for ages?

Thanks, again.

Chris.

Revision history for this message
chris_debian (cjhandrew) wrote :

If we are able to make some progress on this issue, i'd really like to bump the release target to 1.0.

Chris.

Revision history for this message
evolvedlight (steve-evolvedlight) wrote :

I'll sign up today. To get the icon to work, sign up at en.gravatar.com/ and it works on lots of sites. S

Revision history for this message
evolvedlight (steve-evolvedlight) wrote :

<empty comment>

Revision history for this message
evolvedlight (steve-evolvedlight) wrote :
Revision history for this message
evolvedlight (steve-evolvedlight) wrote :

Attached is alpha patch.

Still needs preferences to work (can someone else do this please? I can't get the thing to pick up the username and password!

And could do with a nice contribute screen, not just my nasty 4 buttons.

This replaces the version on the mailing list as that didn't check for accuracy before uploading.

Revision history for this message
evolvedlight (steve-evolvedlight) wrote :

Added screenshots.

See the finished route at http://www.openstreetmap.org/user/evolvedlight/traces/510209

Revision history for this message
evolvedlight (steve-evolvedlight) wrote :

Ha! Worked out how to do preferences.

Revision history for this message
evolvedlight (steve-evolvedlight) wrote :

Added apk for testing.

Revision history for this message
chris_debian (cjhandrew) wrote :

Just installed the APK. This looks very encouraging. I like the way the OSM user details have been added to the 'Preferences'. Does this new functionality allow traces to be stored on the SD card, for manual upload by the user?

Will test tomorrow when walking the dog :-).

Chris.

Revision history for this message
chris_debian (cjhandrew) wrote :

Changed target release to 1.0, but by the looks of the amazing contribution, it could even hit 0.9. Wow!

Chris.

Revision history for this message
evolvedlight (steve-evolvedlight) wrote :

Hey

Glad you like it.

There may be an issue with pressing home and then coming back into the app - it appears to make 2 copies of the recorder. Not quite sure why but it will be solved. For the moment, just don't pause it :-P.

Do I get my name on the credits for this?

Any chance I could get added to this project? It would mean that I get sent all the email updates - I only get them for this one issue at the moment. Thanks :-)

Steve

Revision history for this message
evolvedlight (steve-evolvedlight) wrote :

Ah, it added the attachment again for some reason. Ignore it, that ones just the same.

Revision history for this message
evolvedlight (steve-evolvedlight) wrote :

Hey
Done some tidying up work.

It now looks much nice and provides more feedback.

Screenshots, updated patch and new signed apk are attached.

Steve

Revision history for this message
chris_debian (cjhandrew) wrote :

Just installed it, looking good. Will test track functionality in the next hour.

Excellent work.

Chris.

Revision history for this message
chris_debian (cjhandrew) wrote :

I know we all have the option to password/ pass-gesture protect our 'phones. With this in mind, I still feel a little uneasy that that OSM credentials store the password in plain text. If my 'phone is stolen or accessed, this means my passwd is easily discoverable.

Is it possible to change this? I know on some sites, the letters appear in clear text and then change to * after a moment; perhaps this is an option.

Thanks,

Chris.

Revision history for this message
chris_debian (cjhandrew) wrote :

chris_debian wrote:
> Just installed it, looking good. Will test track functionality in the next hour.
>
> Excellent work.
>
> Chris.

Just tried this. I had to go to my local supermarket. The trace was echo'd to the screen which is an excellent (and unexpected) feature. This means that as I travel, I can see whether my trace differs from the existing map data. This helps improve OSM data accuracy, so is a fringe benefit to OSM, from our project.

When I parked-up at the supermarket, I stopped the trace and submitted it. I thought that OSN had crashed, because the screen went black for a few seconds. It hadn't crashed, and I got a message saying the trace had been uploaded (nice!). Several moments later, I got an email from OSM telling me my trace had been received...perfect.

My only thought is, could we have something happening when the screen goes black, even if it was just a spinning '/' or 'Hold on....working....'.

GREAT WORK!

Chris.

Revision history for this message
chris_debian (cjhandrew) wrote :

Just checked the traces at OSM.

Following on from my previous comment. When I got to the supermarket, I submitted the trace. When I had done the return journey, I submitted the second trace. The trace had not been recorded (probably because of http://www.opensatnav.org/issues/show/23#change-217).

What I did notice though was that my first trace was resubmitted. Does the trace get deleted after it has been submitted, if not, this could cause confusion.

Chris.

Revision history for this message
chris_debian (cjhandrew) wrote :

Would it be possible for OSN to check for stored traces, when starting? If stored traces are found, the user could be asked whether he/ she would like to submit the trace.

For example,

_It seems that you previously recorded and stored a GPS trace. Would you like me to submit this to OSM for you?_

Chris.

Revision history for this message
evolvedlight (steve-evolvedlight) wrote :

Comment 23 sounds like a legitimate issue, I need to go on a long enough walk to collect the data required to make it hang like that. It should be an async upload, I'll see what I can do.

Currently it does not delete tracks when they have been submitted. It probably should do.

At the moment, when you press upload tracks, that is all it does, it doesnt stop recording or delete tracks.

I'm going to add in a function to set the name of the track now, and then go do some mapping with it.

As for the stored traces, at the moment it just holds the trace in memory, so when it starts it won't actually have anything in memory. I presume that if you pressed back to close the app, it would just delete everything. I'll have to think of a good workflow for that.

Steve

Revision history for this message
evolvedlight (steve-evolvedlight) wrote :

Attached is latest version (no patch, I need to clear up strings because some are hardcoded english)
Also some screenshots.
This version:
Better checks for username/password (that they are actually there)
Password is now password field, ie cant see what have just typed apart from last letter
When you press upload, it now asks for a description and then uploads
After upload it clears the route and stops tracing.

Revision history for this message
chris_debian (cjhandrew) wrote :

The password entry works brilliantly.

Good work.

Chris.

Revision history for this message
evolvedlight (steve-evolvedlight) wrote :

Went out mapping and found a few blocker bugs.

May relate to your previous problems, Chris.

Firstly, orientation changes would kill it, thats fixed now.
Secondly, the delete track and upload tracks features didnt "appear" to work before because I didn't refresh the tracing overlay, thats fixed now.

Will upload patch tonight.
Updated APK for testing attached

Revision history for this message
evolvedlight (steve-evolvedlight) wrote :

I've added the requested waypointing functionality.

See the 2 attached screenshots. Extra special is the little star that gets put on the trace for each waypoint so you can see them.

Have tested with OSM and the tracks come out nicely.
Linky: http://www.openstreetmap.org/edit?gpx=511851

As usual, apk is attached.

Revision history for this message
chris_debian (cjhandrew) wrote :

Will try to test, today.

Has anyone else checked-out these latest APK's? Things are looking good.

Cheers,

Chris.

Revision history for this message
Murphy (murphy2712+launchpad) wrote :

evolvedlight wrote:
> As for the stored traces, at the moment it just holds the trace in memory, so when it starts it won't actually have anything in memory. I presume that if you pressed back to close the app, it would just delete everything. I'll have to think of a good workflow for that.

I'm using Google MyTracks sometimes, and it keeps the track recording even when leaving the app with the back key (and leave an icon in the notification bar),
I think the recording track is running in a background service and the main app really closes.

Revision history for this message
evolvedlight (steve-evolvedlight) wrote :

Hey

Attached are testing apk and patches

There's some non-contribute related stuff in there:

My fixes to get gps working correctly as detailed in issue #50
My real name for the contributors page

I've also added a new feature thats useful for recording completely missing areas: it moves uploaded traces into a new memory which is then drawn alongside the new trace, but in a lighter color. New option to delete these and clear map.

Orientation changes when typing into a dialog still cause trouble.

When uploading it now shows a progress indicator.

Before uploading it now does a couple of sanity checks which should reduce change of FQ.

Revision history for this message
Guillaume Rosaire (zerog) wrote :

Has <uses-sdk android:minSdkVersion="3"/> in the manifest been accepted by everyone ? I'm not sure it's the case, do you rely on it ?

Revision history for this message
evolvedlight (steve-evolvedlight) wrote :

Ah, didn't mean to leave that in. It isn't needed.

Revision history for this message
chris_debian (cjhandrew) wrote :

Just installed the APK. I'll let you know of any good/ bad discoveries I make :-). Thanks to everyone that made contributions on this issue....we're getting there!

Chris.

Revision history for this message
evolvedlight (steve-evolvedlight) wrote :

Please note that there is a bug when you turn the orientation while recording. I've fixed it, but eclipse bugged out on me while creating the patch.

Revision history for this message
chris_debian (cjhandrew) wrote :

Just had a quick (walking) test. I tried to do a bit of mapping, and this went well. When I submitted the trace, I was prompted for some text to tag my trace. I instinctively turned my handset into landscape mode so I could slide the KB out. As per your last comment, OSN then crashed.

If it helps, I have attached some logs. Most of the info will be towards the end, I think.

Hope this helps.

Chris.

Revision history for this message
Murphy (murphy2712+launchpad) wrote :

Hi, I've tested this recording feature and it worked quite well, but when uploading to osm, the tags are "OpenSatNav", "9" and "2009".
I think the "9" tag is for september and I don't think it's useful when used alone...
Oh! After looking at your traces (evolvedlight) I see that they were correctly tagged "September".
I remember now that my Android ROM (cyanogen) have a problem with months & days and display them with figures.

Also, the name of the file uploaded contains my email address visible to anyone :(

Revision history for this message
evolvedlight (steve-evolvedlight) wrote :

Think its all better now.

Not sure about the email address thing, it puts in the username as part of the file. Guess I could get rid of that.

It's about finished now, but I need to make it save to SD card too, just in case. (or no mobile signal when mapping)

Gonna go out for some real-world testing now.

Steve

Revision history for this message
Murphy (murphy2712+launchpad) wrote :

This version looks great :) (bug #53 fixed!)

For the email thing, it's because I logged with my email but using the username works too.
Maybe you should detect if the login is an email and not use it in the gpx name.

What's the "delete old traces" for?
Does OSN could log many traces?
Where do we see the list of old traces/how do we load them? (if not it could be a cool feature and I could uninstall Google MyTracks!)

Revision history for this message
evolvedlight (steve-evolvedlight) wrote :

Murphy wrote:
> This version looks great :) (bug #53 fixed!)
>
> For the email thing, it's because I logged with my email but using the username works too.
> Maybe you should detect if the login is an email and not use it in the gpx name.
>
Sounds good, I'll do that

> What's the "delete old traces" for?
> Does OSN could log many traces?
> Where do we see the list of old traces/how do we load them? (if not it could be a cool feature and I could uninstall Google MyTracks!)
At the moment when you upload a trace it then shows it in a lighter colour on the map so you can see where you are in relation to previous traces. Very useful IMHO.

I could make it store several old ones. I currently need to refactor it to make it a service - then I'll look at better ways of storing old traces.

Revision history for this message
Murphy (murphy2712+launchpad) wrote :

When exiting the app (oups, I pushed the back button...) we lose the current track, so it could make sense at least to save it.
Could you also put a message instead of the black screen while uploading? (chris_debian noticed this in comment 23)

Revision history for this message
Kieran Fleming (kieran-fleming) wrote :

I'm sure it would be possible to 'minimise' the app when back is pushed so it works the same as the home button. This would also mean that the route is persistent between runs of the app. I'm sure there would be some issues (there would need to be a 'Clear route' button for example) but does it sound like a good idea?

Revision history for this message
Murphy (murphy2712+launchpad) wrote :

Maybe, but we would also need an "Exit" button.
Except if you reroute the back button only when recording track.
But anyway you need to keep old tracks between sessions (when the app is _really_ closed and restarted).

Revision history for this message
Murphy (murphy2712+launchpad) wrote :

Someone noted that "the Contribute buttons don't fit on the screen in landscape mode".

Revision history for this message
chris_debian (cjhandrew) wrote :

Using the APK found here, http://www.opensatnav.org/issues/show/56#note-3 I have found that when I select 'Start recording', the red (I think) trace does not appear on the screen as it is created, and additionally the 'Start recording' button still shows, when I'd expect to see 'Stop recording'. I hit the 'Submit trace' button and nothing seemed to be submitted. From these symptoms, I have concluded that a trace is not being collected.

Has anyone experienced this?

Thanks,

Chris.

Revision history for this message
Murphy (murphy2712+launchpad) wrote :

This is just an integration problem I had with evolvelight's patch (that don't use last svn).
These two versions (http://www.opensatnav.org/issues/show/50#note-36 and this one) are compromised for the contribute view,
but I made a correction here:
http://www.opensatnav.org/issues/show/50#note-39

Revision history for this message
chris_debian (cjhandrew) wrote :

Murphy wrote:
> This is just an integration problem I had with evolvelight's patch (that don't use last svn).
> These two versions (http://www.opensatnav.org/issues/show/50#note-36 and this one) are compromised for the contribute view,
> but I made a correction here:
> http://www.opensatnav.org/issues/show/50#note-39

Many thanks.

Chris.

Revision history for this message
Kieran Fleming (kieran-fleming) wrote :

evolvedlight,
You said earlier that you wanted to wait for 1.0 before releasing these changes - is that still what you want to do? Personally, I'm happy to put it into 0.9 even if it isn't complete.

Revision history for this message
chris_debian (cjhandrew) wrote :

kizza wrote:
> evolvedlight,
> You said earlier that you wanted to wait for 1.0 before releasing these changes - is that still what you want to do? Personally, I'm happy to put it into 0.9 even if it isn't complete.

I'd second that Kieran. What do you think, Steve?

Chris.

Revision history for this message
evolvedlight (steve-evolvedlight) wrote :

Ok, that sounds good.

I'll see if I can commit tonight.

Steve

Revision history for this message
chris_debian (cjhandrew) wrote :

evolvedlight wrote:
> Ok, that sounds good.
>
> I'll see if I can commit tonight.
>
> Steve

That would be excellent. If I understand correctly, that would also generate a new APK snapshot to replace ZeroG's.

Thanks,

Chris.

Revision history for this message
chris_debian (cjhandrew) wrote :

Target version changed, as discussed.

Chris.

Revision history for this message
evolvedlight (steve-evolvedlight) wrote :

Just waiting up on svn commit authorisation. S

Revision history for this message
chris_debian (cjhandrew) wrote :

Kieran,

Can you help with the authorisation?

Chris.

Revision history for this message
Guillaume Rosaire (zerog) wrote :

chris_debian wrote:
> Kieran,
>
> Can you help with the authorisation?
>
> Chris.

I guess we only need Enrique to create Stephen's Subversion account.

Another possibility would be that Kizza or I commit for him if he can give us a full patch file. Depends on the time that will be needed for Enrique to come back.

Revision history for this message
chris_debian (cjhandrew) wrote :

ZeroG,

Has this progressed, at all? Does anybody need to do anything?

Chris.

Revision history for this message
Guillaume Rosaire (zerog) wrote :

chris_debian wrote:
> ZeroG,
>
> Has this progressed, at all? Does anybody need to do anything?
>
> Chris.

We still need Enrique to create an SVN account.

Revision history for this message
chris_debian (cjhandrew) wrote :

Enrique,

Are you able to do this, so we can commit the change and close the issue?

Cheers,

Chris.

Revision history for this message
evolvedlight (steve-evolvedlight) wrote :

I now have SVN access.

Revision history for this message
chris_debian (cjhandrew) wrote :

Great work! I'll download the APK and test. let's get this closed as soon as we can.

Piluso: Thanks for arranging the svn access.

Chris.

Revision history for this message
chris_debian (cjhandrew) wrote :

chris_debian wrote:
> Great work! I'll download the APK and test. let's get this closed as soon as we can.
>
> Piluso: Thanks for arranging the svn access.
>
> Chris.

Hmm, looks like build 64 didn't include the 'Contribute' stuff.

Revision history for this message
evolvedlight (steve-evolvedlight) wrote :

That was just a test commit. I'm a little busy with a client website at the moment (and start of year student parties :-) so it'll take a day or so to test it after updating to the svn head and merging with my code.

Revision history for this message
chris_debian (cjhandrew) wrote :

Understood :-)

Revision history for this message
chris_debian (cjhandrew) wrote :

Steve,

Can you update this issue when you've been able to roll a new APK? We can then download, test and potentially close this issue.

Cheers,

Chris.

Revision history for this message
evolvedlight (steve-evolvedlight) wrote :

See revision r65 for the initial commit

Revision history for this message
evolvedlight (steve-evolvedlight) wrote :

Oh, and here is apk. Should be the same as the svn one when it's created by the server.

Revision history for this message
chris_debian (cjhandrew) wrote :

Nice one! I'll download and check it out.

Chris.

Revision history for this message
chris_debian (cjhandrew) wrote :

Just a quick comment. When I open-up the Contribute page in Landscape orientation (using physical keyboard), the last button (Delete traces) isn't visible and the screen doesn't scroll. This is immediately rectified by putting the screen into Portrait mode.

Nice to see the Contribute button back again :-).

Chris.

Revision history for this message
Guillaume Rosaire (zerog) wrote :

evolvedlight wrote:
> Oh, and here is apk. Should be the same as the svn one when it's created by the server.

Sorry, there was a conflict in svn on default.properties file, the apk was not auto-generated.

I fixed this, the apk will be generated this night.

Revision history for this message
chris_debian (cjhandrew) wrote :

ZeroG wrote:
> evolvedlight wrote:
> > Oh, and here is apk. Should be the same as the svn one when it's created by the server.
>
> Sorry, there was a conflict in svn on default.properties file, the apk was not auto-generated.
>
> I fixed this, the apk will be generated this night.

Thanks for sorting this.

Chris.

Revision history for this message
chris_debian (cjhandrew) wrote :

Steve,

Does anymore work need to be done on this, or can we consider 'putting it to bed'?

Chris.

Revision history for this message
chris_debian (cjhandrew) wrote :

I've just installed the latest greatest OSN cut and had to re-input my OSM username credentials (as expected).

I was wondering, in Preferences > Username, would it be possible to echo the actual username under the Username heading, instead of the string 'Please enter your OSM username here'?

So when OSN is freshly installed, it would say:

'Username
Please enter your OSM username here'

But once the credentials have been added, this would say (for example):

'Username
chris_debian'

Just a thought.

Chris.

Revision history for this message
Murphy (murphy2712+launchpad) wrote :

I've tested your contribute menu and some texts are not translated (hardcoded):
- "Stop Recording",
- "Delete old traces",
- "Uploading traces",
- "Track with description ... uploaded to OSM. Track cleared and tracing off",
- "Sorry, an error happened: ",
- "GPS fix not good enough to add waypoint, try again",
- "Done".

Revision history for this message
chris_debian (cjhandrew) wrote :

Murphy,

I don't know how the trabslation stuff works, but are you able to suggest a fix for the hardcoding?

Chris.

Revision history for this message
Will Uther (willu-mailinglists) wrote :

Location stuff is pretty easy. Assume you want a string somewhere, e.g. "MyString". First you add that string to res/strings.xml, as '<string name="name_for_my_string"> MyString</string>'. Then, in the code, instead of "MyString", you write @getString(R.string.name_for_my_string)@.

Explanation: Android will convert the strings.xml into a generated java file. In that file, there will be an array of different strings with IDs. R.string.name_for_my_string is a constant integer ID for the string, and getString() uses that ID to get the real string. Someone localising the app can supply a different string to be looked up by editing XML files without having to touch the code, or even recompile.

SatNavActivity.java seems to have most of the strings referred to above. My patch for Issue #65 modifies that file, and I while I didn't touch those parts of the file, I did move code around them. You might want to commit that patch before making these changes, otherwise there will probably be conflicts to resolve when applying my patch.

Revision history for this message
Guillaume Rosaire (zerog) wrote :

I'm doing it, expect a commit in a few minutes

Revision history for this message
Guillaume Rosaire (zerog) wrote :

Evolvedlight :
Could you please explain to me the reason why there are a mRouteRecorder and another mOldRoutes ? I don't understand why there are 2 RouteRecorder (and I don't understand how to translate the 2 different buttons delete old traces and delete traces, for I don't understand their meaning)

Thanks

Revision history for this message
evolvedlight (steve-evolvedlight) wrote :

mRouteRecorder records the locations as they come in as traces. mOldRoutes stores the previously collected traces, so when doing a trace of an unknown area its easier to tell where you are and where you have already been.

However, all of this is going to go, I'm partly through re-coding it as a service and storing into sqlite instead of just memory. This will sort out all the problems of accidentally deleting traces, or times when the trace doesn't upload properly.

Revision history for this message
Kieran Fleming (kieran-fleming) wrote :

I haven't looked at it yet, but willu has posted a patch to use a service for tracing into issue #65.

Revision history for this message
evolvedlight (steve-evolvedlight) wrote :

I'm closing this now, as the specified functionality is provided. Based upon discussions for the average speed and other statistics a new issue will be opened for further development of this with journey recording etc.

To post a comment you must log in.