Giter Club home page Giter Club logo

Comments (4)

truizlop avatar truizlop commented on June 11, 2024

Thanks for your suggestion Ian. Since it seems you already got the fix for this issue, could you submit a pull request? If not, could you provide the JSON that is causing the issue, so that we can reproduce it and fix it ourselves? Thanks!

from stravazpot-android.

IanMSpencer avatar IanMSpencer commented on June 11, 2024

Hi

Haven't yet worked out how to properly use GitHub, had to use a workaround to rebuild the code for my app under Android Studio 2.2 as I don't really understand the gradle system yet.

The problem will only occur if the data includes the average temperature of the activity. To reproduce:

  1. Connect to an account where activities have been created using a device that records temperature (e.g. Garmin 800 series) and download an appropriate ride.
    2)I think if you add average_temp to the data created in your activity test it will fail when you round trip the data.

The code is simply incomplete, so not a big deal to sort out once you look!

// Get rides from strava
AthleteAPI athleteAPI = new AthleteAPI(config);
Athlete athlete = athleteAPI.retrieveCurrentAthlete().execute();
ActivityAPI activityAPI = new ActivityAPI(config);
int page = 1;
List activity_list = null;
do {
Log.i(TAG, "doing page " + page);

// **** THIS FAILS WITH REAL DATA FROM GARMIN
activity_list = activityAPI.listMyActivities().inPage(page) .execute();
// ***** ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
DecimalFormat df = new DecimalFormat("#.#");
df.setRoundingMode(RoundingMode.HALF_UP);

    for (int i = 0; i < activity_list.size(); i++) {
        ride_array_list.add(activity_list.get(i).getName() + ": " + df.format(activity_list.get(i).getDistance().getMeters() / 1000));
       activity_list.get(i).getID(); }
        page++;
   } while (activity_list.size() > 0);
    return ride_array_list;`

Not being unhelpful - just don't know what I'm doing!

from stravazpot-android.

truizlop avatar truizlop commented on June 11, 2024

Don't worry, I'll try to provide a fix soon. You have provided valuable feedback to discover the issue ;)

from stravazpot-android.

truizlop avatar truizlop commented on June 11, 2024

Hi Ian, I have just fixed the issue and published version 1.0.1 of our library. Please, update your Gradle build file to check out the new version where this issue is solved.

from stravazpot-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.