The Wirepulse Android app is a link between the proprietary sensor and the Wirepulse cloud. The sensor tracks wire as it is being pulled from a reel. This data is transmitted to the App through Bluetooth; the App then sends the data to the server. It also provides relevant information to the worker responsible for making cuts; the worker will see which orders they are responsible for, and they will also see which reels should be used for these orders. Once the cut begins, the app displays the current length of the cut, making it easier to make a precise measurement.
One of the first challenges of this app was determining what the sensor-to-app communication would look like. In this case, I thought the best option was to use the Blue Tooth Low Energy beacon feature. This allowed the sensor to advertise its payload to the app. Converting this payload from hex to base-10 involved a good amount of trial and error!
Multithreading is always an issue with apps like this. The app needs to be able to receive messages at any time, but these messages cannot block the UI thread. A simple Handler fixed the problem, at least until I added some math in, and things got slow. It took me minutes to see that the problem was caused by my absent-minded decision to convert the value to a Float. The ultra-precise calculation, happening every time the tablet received a message from the sensor, was slowing the processor down. Floats and doubles are different things!
From there, the biggest decisions related to design. Obviously, the assigned orders had to be the main part of the first screen. I thought about leaving the completed orders off the screen entirely; certainly this would have been easier! Ultimately, though, I thought that would be disorienting. An order is there, and then it is gone. Instead, I decided to keep a second list of the orders that had been completed. After all, how often in life do you literally get to see your tasks move from the "You Need to Do This" list to the "You've Done This!" list?
For the cut screen, I wanted things to be as obvious as possible. A big box for the desired length, and another big box displaying the current length. A big red button to report a problem, and a big blue button to complete the cut. This button only lights up when the cut is within an acceptable range. The ancillary information about the order is below these buttons, in a smaller font.
There's actually not much I would change about this app! It's easy to use, and it's been very reliable.