yuncun / abusivegymreminder Goto Github PK
View Code? Open in Web Editor NEWAn android app that abuses you for missing gym days
License: Other
An android app that abuses you for missing gym days
License: Other
I can't use AbusiveGymReminder
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.
This one is not a critical issue at this stage, but for easier code readability and general awesomeness I recommend we move all uses of SimpleDateFormat, and Calendar to equivalent DateTimes on JodaTime-Android.
Here's a link to know more about JodaTime-Android:
https://github.com/dlew/joda-time-android
I can submit a pull request if you agree with this.
Cheers.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.