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

Add more activity type icons #152

Closed
szpak opened this issue Aug 28, 2021 · 20 comments
Closed

Add more activity type icons #152

szpak opened this issue Aug 28, 2021 · 20 comments
Assignees
Labels
discuss Ideas, mockups, constructive criticisms, and suggestions are welcome! enhancement This is an enhancement of an existing feature
Milestone

Comments

@szpak
Copy link

szpak commented Aug 28, 2021

I really like the simplicity of your logger and a possibility to visualize the track offline. Using it on canoeing, I would propose to add that icon to a set of already provided (to easier distinguish that kind of trips on the track list).

I don't know if there are rules to help automatically detect that kind (an alignment with rives could be hard to determine), however, just having an icon for a manual selection would be completely useful.

@h2ad2
Copy link

h2ad2 commented Sep 1, 2021

Good point! In addition, I would like to propose some sort of "public transport" icon in addition to the airplane. A train, perhaps?

@GrazianoCapelli
Copy link
Member

We should add more icons to identify additional track types.
For example boat, ski, bus, train, motorbike...

Unfortunately there is no way to estimate these kind of activities without internet connection and a method related to terrain analysis, thus you should add them only as manually selectable icons.
I think we should find a way to add all these additional icons to the details dialog avoiding the icons bloating on dialog area, in order to keep simple and eye-balanced the interface.

Could I rename the issue with a mor generic title, in order to use this issue to collect proposals and ideas for additional activity icons? We could use it also for post graphical mockups, in order to think and discuss the implementation.

@szpak
Copy link
Author

szpak commented Sep 8, 2021

I think we should find a way to add all these additional icons to the details dialog avoiding the icons bloating on dialog area, in order to keep simple and eye-balanced the interface.

Sounds very sensible. In the context of canoeing I was also thinking only about a manual assignment.

Could I rename the issue with a mor generic title, in order to use this issue to collect proposals and ideas for additional activity icons? We could use it also for post graphical mockups, in order to think and discuss the implementation.

Sure, go on.

@GrazianoCapelli GrazianoCapelli changed the title New canoe icon Add more activity type icons Sep 9, 2021
@GrazianoCapelli GrazianoCapelli added discuss Ideas, mockups, constructive criticisms, and suggestions are welcome! enhancement This is an enhancement of an existing feature labels Sep 9, 2021
@h2ad2
Copy link

h2ad2 commented Sep 13, 2021

Another option would be to (optionally) completely drop the guesswork and leave it up to the user.

Eg. I bike to the station, take a train into town, and walk the last mile to the office. GPS-Logger's guess is that I drove all the way, door to door. I don't need no guesswork from the software here! Keep it simple and stupid.

Actually, the way I use GPS-Logger is to get more accurate timeline results in Google Maps because my phone only updates the timeline once every so-many minutes. Nothing I can do about that, but GPS-Logger helps improve the resolution. (Btw, my phone is an Android 9, Motorola G6, in case anybody has suggestions how to improve my experience.)

@TVEgit
Copy link

TVEgit commented Jan 31, 2022

I'm not sure I should post here but anyway: I'd like to export the activity in the gpx file. I didn't find the dedicated tag in the gpx specifications, but dropping it as a keyword in the metadata section would work for me. It could be parsed down the road by receiving system.

@GrazianoCapelli
Copy link
Member

@TVEgit In effect unfortunately there is no dedicated tag for it.
Please post some GPX lines to show us what you would like to have into GPX files, starting from one of our headers.

@TVEgit
Copy link

TVEgit commented Feb 2, 2022

Here is an example. There is already a metadata section. It should be simple to add the keywords tag then use it for passing activity type (or other useful keywords).
Ideally, the settings of GPS Logger should let the user create (and store) key-value pairs to map the different activity icons in GPS Logger with the keyword to be exported in this tag.
There can be more than one keyword so they should be comma-separated.

<metadata> 
 <name>GPS Logger 20220116-092645</name>
 <desc>Boucle SRN Charpal - Fortunio</desc>
 <time>2022-02-02T10:52:32Z</time>
 <keywords>Activity=MTB</keywords>
</metadata>

Alternatively, a keywords field where users could just type in whatever keywords they wish to pass into the appropriate GPX section could be added to GPS Logger.

@GrazianoCapelli
Copy link
Member

GrazianoCapelli commented Feb 6, 2022

In effect, basing on what is written into the GPX 1.1 Manual:

<keywords>
Optional in: <gpx>
<keywords>Hiking, NH, Presidential Range</keywords>
Keywords for indexing the GPX file with search engines. Comma separated.

the <keywords> tag could be a good place where to put the activity type.
Reading the example, the best approach to follow the guidelines is the following:

<keywords>walking</keywords>

Obviously the activity type should always be expressed in English, in order to keep the keywords homogeneous across the languages. Since we can freely choose a convention, we could copy the activity definitions from Garmin:

  • other
  • mountaineering
  • walking
  • running
  • cycling
  • driving_general
  • flying

Both GPX standards have the <keyword> field, but in different places (GPX 1.1 requires to place it into <metadata> section).
Thus two examples of it are the following:

GPX 1.0

<?xml version="1.0" encoding="UTF-8"?>
<gpx version="1.0"
     creator="BasicAirData GPS Logger 3.1.3-dev.20220205"
     xmlns="http://www.topografix.com/GPX/1/0"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd">
<name>GPS Logger 20220205-173623</name>
<desc>First small outdoor activity with Iris</desc>
<time>2022-02-06T13:18:36Z</time>
<keywords>walking</keywords>
...

GPX 1.1

<?xml version="1.0" encoding="UTF-8"?>
<gpx version="1.1"
     creator="BasicAirData GPS Logger 3.1.3-dev.20220205"
     xmlns="http://www.topografix.com/GPX/1/1"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd">
<metadata> 
 <name>GPS Logger 20220205-173623</name>
 <desc>First small outdoor activity with Iris</desc>
 <time>2022-02-06T20:23:26Z</time>
 <keywords>walking</keywords>
</metadata>
...

Both the examples here above passed the Xerces validation test, and could be implemented.
We are used to validate our GPX files using Xerces (mine is the v3.2.3 for Linux):

SAXCount -v=always -n -s -f file_to_validate.gpx

@TVEgit I opened the issue #163 to track, discuss, and implement this topic.

@GrazianoCapelli
Copy link
Member

GrazianoCapelli commented Sep 9, 2022

As a note, some people requested to add water related activity types, for example boat and canoe.

@GrazianoCapelli
Copy link
Member

I pushed a first commit that starts the implementation of a new dialog that allows the user to choose among a good number of activity types. As first implementation, I chosen the following approach:

Screenshot_20221023-221929_GPS Logger_S

I tried to subdivide the activities in categories (Fitness, Water & Snow, Wheel, Air, and Other);
I already made/added a quite complete list of activities to try to cover almost all the users needs, but in the next commits I'll refine it, basing also on your feedback.

Time for suggestions...

@GrazianoCapelli GrazianoCapelli self-assigned this Oct 23, 2022
@TVEgit
Copy link

TVEgit commented Oct 24, 2022

That should be good to propose all these activities' icons but ideally, each user should be able to create his/her own set of icons.
Displaying this list with a check box for each and saving the list as a subset presented at the time of saving the file should work well.
I hope I made myself clear enough...

@GrazianoCapelli GrazianoCapelli added this to the v3.2.0 milestone Oct 24, 2022
@GrazianoCapelli
Copy link
Member

I agree, it is not practical for the user to choose the activity type using the dialog that I posted yesterday all the time.
I was thinking to keep a subset of icons on the details screen (graphically where we currently show the activity icons) where we could simply show the last 5 - 6 used icons, with the possibility to open the big chooser (at this purpose I temporarily placed a right arrow on the edit details dialog, as shown here below) when the activity is not listed on the subset.

Details_20221024

@h2ad2
Copy link

h2ad2 commented Oct 24, 2022 via email

@GrazianoCapelli
Copy link
Member

GrazianoCapelli commented Oct 24, 2022

Here below a list of tasks to be done to implement this feature, in order to keep track of the implementation status:

  • (commit 2e9f3e7) First graphical mockup of the new dialog
  • (commit b01072e) Assign a number (for the DB) and a name (for the GPX exporting) to each activity type
  • (commit b01072e) Choose the best string to describe each activity category
  • (commit 3c9084d) Implement a full working activity type selection dialog
  • (commit eaa9d63) Fix the <Scrollable> behaviour into big selection dialog (it should scroll until the last row is fully visible on small and horizontal screens)
  • (commit 2e9f3e7) Choose a good icon into Edit details to open the big activity selection dialog: ... ►: I chosen to keep the right arrow
  • (commit b02a9ed e1c5227 327baef a2e3793 bb4f413) Optimize the icon set (we should improve the para-glider icon, maybe add some additional activities into Air and Other categories), basing also on user suggestions
  • (commit 44be992) Change the subset of icons in Edit details dialog basing on the latest used icons: pre-fill the subset with the standard icons, make sure that the detected type appears into the subset, and save the subset activity numbers into the preferences
  • (commit 40800a7) Fix the crash loading icons in Android 4.x
  • (commit b01072e) Export the activity name to the GPX files, into the <keywords> tag
  • Check the behaviour of the new code in case type = NOT_AVAILABLE (for example if fixes haven't speed): it rightly shows the latest used icons without enable one them. Te same way for the big chooser

@GrazianoCapelli
Copy link
Member

@h2ad2 - We are going in this direction (that is the most used in the Android apps): we placed a "More" button on the right of the icons subset (something like an arrow, or 3 horizontal dots); clicking it will open the big dialog.
After some thoughts I tried this approach as first implementation and I found it simple and intuitive.

I thought to adapt the 6 icons of the subset to contain the estimated (1) and the latest used (5) icons, but maybe I'll try to add a second line of icons to have an idea of the visual appeal of the interface.

@GrazianoCapelli
Copy link
Member

The complete list of the activity names (that are written into <keywords> tag of GPX files) is into Track.java, starting from row number 90.
At the moment we defined the following types:

            "steady",                                           // STEADY           = 0
            "walking",                                          // WALK             = 1
            "mountaineering",                                   // MOUNTAIN         = 2
            "running",                                          // RUN              = 3
            "cycling",                                          // BICYCLE          = 4
            "car",                                              // CAR              = 5
            "flying",                                           // FLIGHT           = 6
            "hiking",                                           // HIKING           = 7
            "nordic_walking",                                   // NORDICWALKING    = 8
            "swimming",                                         // SWIMMING         = 9
            "scuba_diving",                                     // SCUBADIVING      = 10
            "rowing",                                           // ROWING           = 11
            "kayaking",                                         // KAYAKING         = 12
            "surfing",                                          // SURFING          = 13
            "kitesurfing",                                      // KITESURFING      = 14
            "sailing",                                          // SAILING          = 15
            "boat",                                             // BOAT             = 16
            "downhill_skiing",                                  // DOWNHILLSKIING   = 17
            "snowboarding",                                     // SNOWBOARDING     = 18
            "sledding",                                         // SLEDDING         = 19
            "snowmobile",                                       // SNOWMOBILE       = 20
            "snowshoeing",                                      // SNOWSHOEING      = 21
            "ice_skating",                                      // ICESKATING       = 22
            "helicopter",                                       // HELICOPTER       = 23
            "rocket",                                           // ROCKET           = 24
            "paragliding",                                      // PARAGLIDING      = 25
            "air_balloon",                                      // AIRBALLOON       = 26
            "skateboarding",                                    // SKATEBOARDING    = 27
            "roller_skating",                                   // ROLLERSKATING    = 28
            "wheelchair",                                       // WHEELCHAIR       = 29
            "electric_scooter",                                 // ELECTRICSCOOTER  = 30
            "moped",                                            // MOPED            = 31
            "motorcycle",                                       // MOTORCYCLE       = 32
            "truck",                                            // TRUCK            = 33
            "bus",                                              // BUS              = 34
            "train",                                            // TRAIN            = 35
            "agriculture",                                      // AGRICULTURE      = 36
            "city",                                             // CITY             = 37
            "forest",                                           // FOREST           = 38
            "work",                                             // WORK             = 39
            "photography",                                      // PHOTOGRAPHY      = 40
            "research",                                         // RESEARCH         = 41
            "soccer",                                           // SOCCER           = 42
            "golf",                                             // GOLF             = 43
            "pets",                                             // PETS             = 44
            "map"                                               // MAP              = 45

@GrazianoCapelli
Copy link
Member

Note for developers

We are using the standard icons available as vector asset in Android Studio (the Google Material icons).

When the icon was not present into that standard library, we used the icons published on https://materialdesignicons.com/.
This icon collection is released as free, open source, and GPL friendly by the Pictogrammers icon group. The icons are usable for commercial projects, open source projects, or anything really.
Here you can read the License.

@GrazianoCapelli
Copy link
Member

GrazianoCapelli commented Nov 4, 2022

The implementation of the feature is finished, it needs only some tests that I'll do in the next days.
the Edit Details dialog (and also the Finalization one) now has an arrow on the right of the icons subset, that allows to open the big activity chooser:

issue-152 - 20221104

At this time we could add additionally activities and polish the visual appearance of the interface.
This is a good time to propose activities that I hadn't thought of, or to discuss the work we made.

@GrazianoCapelli
Copy link
Member

The feature has been merged into develop branch, and it will be included into the next release of the app.
I close the issue, feel free to comment here or re-open it in case of need.

@szpak
Copy link
Author

szpak commented Nov 10, 2022

Thanks @GrazianoCapelli for you work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss Ideas, mockups, constructive criticisms, and suggestions are welcome! enhancement This is an enhancement of an existing feature
Projects
None yet
Development

No branches or pull requests

4 participants