Giter VIP home page Giter VIP logo

abusivegymreminder's People

Contributors

julianviso avatar yuncun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

abusivegymreminder's Issues

Should only log the longest session every day

For example, today I went to the gym from 3 PM to 4 PM, the app logged it correctly, after that I was running errands, while passing by the gym for a minute or two. The app recognized it as a gym visit and overrided the correctly logged visit with a 2 minutes visit.
I think the app should not override a longer visit with a shorter visit on the same day.

I tried fixing it myself but as far as I understand you are overriding visits when entering the specified area

if (geofenceTransition == Geofence.GEOFENCE_TRANSITION_DWELL)

            //Log the transition details.
            SharedPrefUtil.updateMainLog(context, "Geofence dwell") ;

            //Update gym status today
            updateLastDayRecord(context);
            rememberGymHabits(context);
            ReminderOracle.doLeaveOnGymArrivalMessage(context, true);
            //sendNotification("GEO FENCE FROM SERVICE", context);

            //Update last visited time
            long time= System.currentTimeMillis();
            SharedPrefUtil.updateLastVisitTime(context, time);

            //Open a visiting counter on this day
            MsgAndDayRecords datasource;
            datasource = MsgAndDayRecords.getInstance();
            datasource.openDatabase();
            DayRecord today = datasource.getLastDayRecord();
            today.startCurrentVisit();
            datasource.updateLatestDayRecordVisits(today.getSerializedVisitsList());
            datasource.closeDatabase();

I don't want to make drastic changes to a code I'm not familiar with so it will be swell if you could fix this issue :)

Let me know if I can help with anything

Edit:
I now noticed that the app should be able to track several visits per day.
I am sure that it logged my first visit correctly (about 45 minutes), but it seems like after the second visit the original visit was corrupted. Probably a bug, I will try to add an option to manually change the total time.

Gym Visits not registering

This is an ongoing issue that I've been chasing. I've received three reports of gym visits not registering, but I cant reproduce it.

Please let me know if you encounter this problem, and are willing to answer some questions about your phone.

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.