Pedometer’s Update

I have continued working on the Pedometer.  I realized that Text-to-Speech was not feasible in the current state.  Every-time the service would leak.  The obvious solution everywhere says to shutdown the Text-to-Speech engine.  So I was already shutting down, checking that it was running, and no matter which way the service would leak.  In the end I had to change constructors and remove this feature.  Text-to-speech is really cool.  I have thoughts of another way it can work.  But for now the Pedometer works OK.  Otherwise, I re-implemented an idea I had at first, that I was using from an early version of the Native Android Pedometer. Instead of making new objects, I removed listeners when stopping the Pedometer timer, then added back the corresponding listener when enabling the timer.  This is better to me, because there are less objects being created doing the same thing.  Maybe the Garbage Collector would have taken care of this.  So this Pedometer has gone places this year.  From where I started with the Cordova PhoneGap Accelerometer JavaScript, with sliders to adjust sensitivity to a PhoneGap Application that implements Native Android Background Services and Native Accelerometer that runs in the background even when the user turns of the display.  I have tested this implementation on two nights.  I count approximately 6000 steps plus calories!

PhoneGap, Pedometer, and Intents

This week I spent some time updating the Pedometer branches that I was working on.  At first my Native-Pedometer branch had too many conflicts and errors after merging.  So much of the day was spent making my final commits and pushes to this old deprecated branch.  Next I checked out the DEV branch, made sure it worked and and then made the Native Pedometer II branch.  This all was working after checking on the phone.  This was the new branch I would work with from now until the next successful merge.  I would like to say thanks to Wei for his advice on how this complicated process works.  Next I made a pull request in my Bit Bucket repository so from now I can simply commit, push and make updates whenever.  This all been done, I wanted to now do some more work.  I feel that some way to connect the Pedometer to the Mobile Blue Tooth adapter could be through intents.  That way when a user clicks on a button a new activity is launched. Currently I am investigating this process and hope to solve this efficiently and creatively.  This is my task at the moment and is based on concepts I am researching and have learned in class previously.

Latest on the Pedometer

Last week was very interesting.  I was given an opportunity to present at the NEXJ Express booth at the CDOT Open House.  Many came and went.  Some stopped to ask questions about the work we do.  I was glad to answer the questions as challenging as they were.  At the end of this special evening I felt a great sense of achievement.

The next day Friday I spent time reviewing the Pedometer.  I have made some improvements that I think are important.  Such as:

Pedometer running
Pedometer running:  This is the first state, the pedometer is running
Pedometer paused
Pedometer paused: The user can pause their activity and the resume
Pedometer off
Pedometer off:  The user has stopped the Pedometer and all related step counting activities.
The user can only save their progress when the timer is enabled.  The next step is the pull request for the Pedometer.  Thanks for your time.

Week ending 15/11/2013

This week I spent my time upgrading the pedometer from Cordova 2.5.0 to 2.9.0.  The changes that are noticeable are in the config.xml file. Plugins are now known as features, and if you don’t use “android-package” you end up having problems.  So if your new to this it will take a while to make sure everything is working.  So with a bit of luck I had the Pedometer working by the evening and noticed that there are improvements that need to be made.  In my next blog post, I will post a picture of that Pedometer looks like.  I am no longer using using the jQuery available via HTTP, everything is now included whether you are online or offline.  Likewise for the CSS.  I look forward to continuing ‘servicing’ the pedometer this week already here.  It should be on demo with the rest of the Mobile Bluetooth adapter this Thursday at the CDOT open house.  So see you soon.

Summing up Week ending Nov 8 2013

So the Pedometer is in the final stages, and is doing what it needs to do (steps and calories).  I am making a final effort to use Java’s TimerTask to do the updates to the UI rather than JavaScript’s set interval.  After this I will push the Pedometer and merge.  Then I can gain an opportunity to learn more about the scope of the project.  Who knows whats in store!  I have been working on the Pedometer since early start of Summer.  I remember the first email from Mr. Anastasiade mentioning how it might be needed.  This project has given me the chance to learn about Android Services and Sensors.  I am glad that I was able to contribute my time and energy towards this requirement at NEXJ Express.  It has been a worthwhile experience working alongside my fellow peers.

Summing up Week ending Nov 1 2013

This week I continued to work on the Pedometer.  I made improvements such as counting the steps in the background when the phone is turned off.  I guess this is a step to final working App.  Next I will be implementing the GPS distance and Speed.  I am learning to prefer library source code to the JAR that most authors provide, that way I can work with the API as well as the nitty gritty that goes on behind the scenes.  This is a lot to learn and realize as in the end I am finally getting to benefit from Open Source ethic-ism.  This week I am continuing the Pedometer project.  I will implement distance and speed.  There is more that what meets the eye.  See you at the end of this week.

My Post for Week Ending Oct/18/2013

My main goal for this week was starting to integrate the pedometer with the Mobile Bluetooth adapter.  So I started by importing the project into the bigger picture.  I spent some time looking at how to create a separate action in the MedicalDevicePlugin Class.  My aim is to create an action that will allow me to launch the Pedometer Activity that starts the Step Service.  Definitely this is one way to tackle the problem, and I will need to create other ways of gathering information from the pedometer.  Me and Wei actually spent probably an hour talking about how this could work.  I look forward to having the final product implemented soon.