Skip to content

Nenuphar12/MySportMap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo of My Sport Map

My Sport Map

style: very good analysis License: MIT Commitizen friendly

Small application to view all your Strava's activities on one map !

This application connects to Strava to fetch all your sport activities. These activities are then displayed on a single map.

This map can then be used in different ways :

  • you can get an overview of your activities over the world
  • really useful if like my you like to explore new areas
  • can make you remember about nice memories

This project is a free and open source alternative to the application Sports Map.

Generated by the [Very Good CLI][very_good_cli_link] 🤖

Main screenshot

Features

These features are implemented by the application :

  • displays all your strava's activities on one map
    • each type of activity has its own color
  • shows your location on the map

Roadmap

Future features :

  • filtering activities
  • display more information about activities

Setup the project 🔧

Here are a few steps to setup the project.

You can skip these and go directly to Getting Started 🚀 but you might not get access to Strava if too many people are using the API key provided. And the map might not be detailed (it should be ok if you stay in debug mode, ie. if you do not build the app but just run it).

Add Google Maps API key

You will need to add your Google maps API key.

Note: You can find the full documentation to use Google Maps with Flutter HERE.

For Android

Add your Google Maps API key in android\app\src\main\AndroidManifest.xml.

<!-- TODO: Add your Google Maps API key here -->
<meta-data android:name="com.google.android.geo.API_KEY"
          android:value="YOUR-KEY-HERE" />

To get your API key, follow these instructions.

Note: It will probably work without an API key but the map precision might not be optimal.

Setup Strava API

You will need to make an Application. According to Strava documentation, follow these steps :

  1. If you have not already, go to https://www.strava.com/register and sign up for a Strava account.
  2. After you are logged in, go to https://www.strava.com/settings/api and create an app.
  3. You should see the “My API Application” page now. Set the following information :
  • Category: MobileApp
  • Authorization Callback Domain: redirect
  • Optional setup
    • Application name: my_sport_map
    • Application description: Flutter app to see all my activities on one map.

Note: You can use this logo.

You will now copy your Client ID and Client Secret into a lib/secret.dart file :

const String clientId = 'your-client-id';
const String clientSecret = 'your-client-secret';

Getting Started 🚀

This project contains 3 flavors:

  • development
  • staging
  • production

To run the desired flavor either use the launch configuration in VSCode/Android Studio or use the following commands:

# Development
$ flutter run --flavor development --target lib/main_development.dart

# Staging
$ flutter run --flavor staging --target lib/main_staging.dart

# Production
$ flutter run --flavor production --target lib/main_production.dart

*My Sport Map as only been tested on Android at the moment.

Building the app

To build the application run the following command from the project directory :

# Android AppBundle
$ flutter build appbundle -t lib/main_production.dart

# Android APK
$ flutter build apk -t lib/main_production.dart

Now you just have to login and enjoy all your outside activities !

Running Tests 🧪

To run all unit and widget tests use the following command:

$ flutter test --coverage --test-randomize-ordering-seed random

To view the generated coverage report you can use lcov.

# Generate Coverage Report
$ genhtml coverage/lcov.info -o coverage/html/

# Open Coverage Report
$ open coverage/index.html

Contributing 🙌

Any contribution is welcome ! If you have new feature idea that you would like to see or if you spot a bug, feel free to open an issue.

And if you want to implement a new feature or fix an issue that would be awesome.

For more information check CONTRIBUTING.md.

License 📄

Distributed under the MIT license. See LICENSE for more information.

Acknowledgments ⭐

Thanks to dreampowder for implementing strava_flutter, a Strava API for Flutter.

About

A sport map with all your activities !

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages