CompanyGateways / mytracks

Automatically exported from code.google.com/p/mytracks
1 stars 0 forks source link

Voice snnouncements - support distances less than 1 mile #502

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
We should support fractional distance announcements. IE 1/4 mi, 1/5 km etc.

This is probably a little difficult because of the way we encode the distance 
pref.

Original issue reported on code.google.com by sandordo...@google.com on 22 Jun 2011 at 5:52

GoogleCodeExporter commented 8 years ago
Here is a sketch about how this should work:

The change you will need to make will be changing the arrays in 
http://code.google.com/p/mytracks/source/browse/MyTracks/res/values/arrays.xml
You need change the task_frequency_options and task_frequency_options_ft
in 
http://code.google.com/p/mytracks/source/browse/MyTracks/res/values/arrays_do_no
t_translate.xml
You need to change the task_frequency_vaues

You will need to update:
http://code.google.com/p/mytracks/source/browse/MyTracks/src/com/google/android/
apps/mytracks/services/tasks/PeriodicTaskExecutor.java
To change the taskFrequency variable from an int to a double.

Things that will make this a bit tricky:
- The preference is integer values only.
- We will need to make sure that the old values still work.
- Any changes need to be made to all of the languages where these arrays are 
declared.

My proposal would be to treat any value less than -1000 as a fractional value.  
For example 1/2 mile would be -1500, 1/4 = -1250

Original comment by sandordo...@google.com on 5 Jul 2011 at 11:11

GoogleCodeExporter commented 8 years ago
Why not just multiply all distance values by 1000? Would be less hacky.

Original comment by rdama...@google.com on 5 Jul 2011 at 11:12

GoogleCodeExporter commented 8 years ago
So we don't break backwards compatibility.  If we change the meaning all 
previous settings would not make sense anymore.  I think it is pretty safe that 
we will never support intervals greater than 1000.

Original comment by sandordo...@google.com on 5 Jul 2011 at 11:35

GoogleCodeExporter commented 8 years ago
If it's about making assumptions about different formats, why not just assume 
that any value greater than 200 is the new style? It's just as hacky, and a bit 
simpler.

Original comment by rdama...@google.com on 5 Jul 2011 at 11:59

GoogleCodeExporter commented 8 years ago
I don't see how it is simpler. I like round numbers. 1000 is nice and even.  It 
seems that is all we arguing about is if we can take the value and divide by 
1000 or take the value subtract 1000 then divide by 1000.

Original comment by sandordo...@google.com on 6 Jul 2011 at 4:48

GoogleCodeExporter commented 8 years ago
Yup, that's right, it's one less operation (not that it changes performance, 
it's just simpler to understand). Anyway, up to you.

Original comment by rdama...@google.com on 6 Jul 2011 at 9:24

GoogleCodeExporter commented 8 years ago
Issue 548 has been merged into this issue.

Original comment by sandordo...@google.com on 24 Aug 2011 at 6:01

GoogleCodeExporter commented 8 years ago

Original comment by jshih@google.com on 10 Sep 2012 at 11:16

GoogleCodeExporter commented 8 years ago
Issue 620 has been merged into this issue.

Original comment by jshih@google.com on 10 Sep 2012 at 11:59

GoogleCodeExporter commented 8 years ago

Original comment by jshih@google.com on 11 Sep 2012 at 12:38

GoogleCodeExporter commented 8 years ago

Original comment by jshih@google.com on 11 Sep 2012 at 12:50

GoogleCodeExporter commented 8 years ago
Issue 1501 has been merged into this issue.

Original comment by jshih@google.com on 13 Oct 2014 at 9:05