I’ve been wanting to interview someone from Fitbit on Get Up and CODE for a while now and Iris and I finally got our chance.
In this episode of Get Up and CODE, we talk to the mobile engineer lead for Fitbit, Barry Burton.
Barry shares with us some details of how the Fitbit mobile app works and tell use why Bluetooth is so hard.
Check out the episode below.
Full transcript:
John: Welcome to Get Up and Code. We have another guest today on the show. This is going to be a really good episode. This is the episode that I’ve been looking forward to. I’ve been wanting to talk to someone from Fitbit for quite awhile because we always talk about Fitbit on this show.
We’ve got Barry Burton who is the mobile engineering lead at Fitbit. He’s responsible for the mobile applications for Fitbit. If you guys and girls have problems with your mobile apps unit, now you know who to talk to. Welcome to the show, Barry. Tell us a little bit about yourself and your role.
Barry: Yeah, sure and thanks for having me on. I’ve been at Fitbit about 2-1/2 years now, and I came on to start our mobile apps. I'm directly involved in the iOS app and have managed the entertainment a little bit. We just have a lot going on trying to gather more data for users like keep our hardware devices syncing up to our website and then figuring out new ways to visualize that data and show it back to users, let users get their own insights from their data as well as finding ways so we can figure out insights for them.
John: Okay, awesome. Now, I guess it probably makes a little bit sense to talk about what Fitbit is. Most people have heard of Fitbit by now. It’s funny. We’re just talking about how like a couple of years ago Fitbit was such a small company. Now, it’s like huge like everybody knows about Fitbit. It’s in every store, but, yeah, you want to talk a little bit about what exactly Fitbit is?
Iris: Sure. I guess in a more general sense, our wearable sensor devices and have a wireless component to get data off of your device and into our cloud backend. We have a Wi-Fi scale that we’re probably less known for, but our main product is an activity tracker that uses a 3D accelerometer to track your steps and the distance that you travel, the calories you’ve burned. Some of our models also have an altimeter so you can track the number of floors that you climb. It’s about helping you just look at the actual data for how much you’re moving as a way to encourage you to move more rather than focusing on exercise as a specific time where you go for 30 minutes and do something just being more active in your regular life. Another big part of that is our leader boards where it can see the steps that your friends are taking and a lot of people end up in competition with their friends seeing who can get the most steps over the last 7 days.
John: Yeah.
Iris: Or chasing. It’s like chasing. You give this to a friend or somebody that might benefit from a little bit more exercise. Then you just add me as a friend and you start nagging them repeatedly. It does work. I’ve tried it.
John: That’s funny.
Iris: I have to ask because this is one thing I really, really wanted to know. How do you test the Fitbit and the application? Do you do like hands-on testing? How do you test it? Do you have to run up and down stairs or what? How do you do it?
Barry: Yeah. For the most part, testing the entire system, there is not a shortcut. We just have to all wear the devices. All of the employees are testing, and when they’re coming out with a new device with new features we’re all just using it over a period of weeks or months and seeing how it works. There are definitely lots of little tests we can do on components, but as far as like the system as a whole there is just not a shortcut.
John: Yeah. That’s interesting.
Barry: It’s funny that the employees often have like several devices on.
John: That’s funny.
Iris: Oh, sorry. Go ahead, John.
John: I was going to say when I wrote my mobile app, my like running app, this little app that tracked your pace, I remember there was no way to test it besides to go outside and run. I’d have my Android phone plugged in and I'm in the debugger, and then I'm like, “Okay, I need to figure out if it’s going to alert when I hit a certain pace so I got to go outside and run.” I’d go and run and come back, and with these physical devices it’s like you got to test it that way.
Iris: Well, you can always just get a student that has to do his or her practical training. Hey, you want it hands-on. It doesn’t get more hands-on than this. I guess that maybe if a developer signs up for a job and gets a job at Fitbit maybe they didn’t quite see that bit. Do you do any fitness tests prior to hiring people?
Barry: No. I think we’re a pretty average engineering company. We have people of all fitness levels. For the most part though, the testing that needs to be done isn't any super active fitness. Really, our products are just about tracking how active you are just in your normal life.
John: Now, one thing that I’ve always wondered. You have an iOS app and an Android app, right?
Barry: Correct.
John: Do you have Windows phones, 7, yet or?
Barry: No. We have a very vocal number of users that would love to see that, and it’s something we’re watching closely. So far just the market share numbers aren’t quite there and we’re still pretty small and just –
Iris: There are some API, isn’t there though for Fitbit?
Barry: They have initially come out with a Bluetooth API, if that’s what you’re talking about.
Iris: I have a vague memory. I might be completely wrong, but I believe that one of my ex-colleagues at Telerik, Michael Crump, a fantastic Windows phone developer – I just think that he actually made an application that works with Fitbit, but I'm not 100% sure. I might remember on.
Barry: There are a couple of applications in the store that work with our API.
Iris: Yeah, it does. Yeah.
Barry: Will show you most of your data. The thing that’s lacking is an app that will sync your hardware device up to the website. The Bluetooth integration with any mobile platform has been a challenge.
John: Oh, yeah.
Barry: We’ve seen it twice now. We are starting to look into that.
John: What do you use to build? Let’s look at some of the apps. I'm curious about the technology behind it. Your iOS app are you using just native Objective-C to build that and what kind of tooling are you doing?
Barry: Correct. It’s pretty much a straight iOS app, Objective-C using some –
Iris: I feel your pain.
Barry: The Android app is all just Java and made in a normal way. We don’t really share a lot of source code between them.
John: Yeah. I imagine –
Iris: The algorithms. Are those baked into the components themselves or is this something that is done in code?
Barry: The devices themselves run a lot of the code for just taking the continuous real time stream of data coming off of the sensors and crunching that, doing signal pattern analysis on it to figure out basically what’s going on the servers. Do a little bit of post processing after that. As far as the mobile applications, they’re mostly just displaying the data that are already available.
John: Now, what about this magic? Well, I remember I had the first Fitbit, the original one, right and I had to sync it with the little doc on my computer, which wasn’t bad. It was okay. Then I got the new one, the Fitbit Flex that little tiny thing. When it synced with my phone, I was like, “What? What just happened there?” That was crazy. How is that working with it syncing with the Android phone without me even being near the computer? I didn’t pair or anything, right? I don’t think I paired it or maybe there was … I don’t remember that, but …
Barry: It’s using Bluetooth Low Energy which just really started rolling out into consumer products about 2 years ago. It’s part of the Bluetooth 4.0 specification, but the low energy part is really completely unrelated to regular Bluetooth other than the fact that they both used 2.4 GHz. With Bluetooth low energy it’s more of a service model where you can have service that offers services and then clients can look for those services and make use of them, and so you don’t necessarily have to do a pairing, as in with a classic Bluetooth.
For the way we handle it is we do all of the security ourselves on top of the Bluetooth Low Energy Layer, so anyone could talk to your device and get the data off of it. It would be encrypted and can only be decrypted by our servers. That’s how we provide the security. You get a very nice seamless experience. This initial step where you pair your device to our backend and then once our servers knows which device is yours we can seamlessly sync it from your app.
John: Yeah. That was pretty cool. That was pretty amazing. That was one thing I don’t think I even saw in the marketing material. I didn’t realize that when I got this thing that it was automatically – the pairing is not a huge pain, but it can be a pain to pair Bluetooth devices. That was pretty cool. I was like, “How the heck did this magically work? How did it know that this is my device?” I like that.
Barry: Cool.
Iris: Was this a feature that was highly requested by users to be able to just sync it with their phone?
Barry: Yeah. Back going 2, 3 years when we had the classic and Ultra checkers it was a really common feature requested to be able to sync them and people that don’t travel with their laptop or whatever, be away from home and just have no way to sync their device. Back then we were using ANT Wireless Protocol. It’s similar to Bluetooth Low Energy but proprietary protocol that isn’t supported by pretty much any mobile devices. The important thing was with amp and PTLE is it lets us use them because they’re very low power. It’s as tiny device getting a week or more battery life is pretty difficult but that’s also really important for keeping it very usable. You don’t want to have to charge it every night.
John: Right, exactly. What’s the biggest challenge with developing these? One thing that just makes me curious like the apps aren’t the most simple apps, I mean they’re not the most complicated apps either but you’re making 2 code bases in Objective-C and Java which is – I mean like you said, you can’t share codes. How does that work? Is that painful at all? How is your team divided?
Barry: Yeah, I mean we have 2 very dedicated platform teams. We find Android and iPhone, the frameworks and UI kits are pretty different. To be really good at working in either of those you have to focus on one, but we do share a lot of ideas around features and design and higher level stuff and then each team more or less implements it on their own. I mean we still have the ability to talk about solving the problems, the algorithms that we need to use, strategy and all those stuff.
Iris: How large are the developer teams?
Barry: We have about 10 iOS developers and about 8 Android developers.
Iris: Wow. How come it takes 2 more with the … ?
Barry: Well, we’re trying to grow both teams currently. Historically we started with the iPhone app about 6 months before the Android app so it’s just always had a little bit of a head start in terms of growing and just in terms of building new features there so often we’ll take advantage of that size disparity by building a feature first on iPhone and then once we’ve kind of figured it out building it on Android and so that takes a little bit less time.
John: That makes sense. Have you guys looked at the Xamarin tools at all for building it within one code base or sharing code or?
Barry: Yeah, I think the Bluetooth and the level of data communication is always the thing that gets really tricky for us just because all of the mobile platforms Android and iPhone have had just tons of Bluetooth issues so we’re constantly having to make sure that we’re working off the very latest releases. When betas are coming out on both Android and iPhone platforms we have to be using those betas immediately before they’re even public. Getting any kind of third party toolkits in the middle where they need to be updated is just not really something we can do.
John: That makes sense. I guess people would be pretty ticked off if the new version of the phone operating system comes out or there’s an update and then their Fitbit stops working.
Barry: Right.
John: Because now that people are relying – I mean before when people were syncing with their desktop it was different I guess, but now people are relying on it working with their phone I guess. That’s kind of a big, big deal.
Barry: Right and I mean we’re in a little bit of a unique position for an app because we’re not something that you got for free or paid $2 for but someone went out and paid a lot of money for this hardware device and they expect it to be reliable and to work.
John: Yeah, that makes sense. What’s the biggest challenge that you guys have had with developing the app? Is it the Bluetooth or is there something else?
Barry: No, the Bluetooth by far has been the biggest challenge. It’s been very fragmented and we’ve had to use different libraries on different devices and even for the same libraries on different devices we found very different behavior. It’s been a lot of reverse engineering and just working and iterating to make things work. It hasn’t been easy.
John: That’s kind of fun though reverse engineering stuff. It’s a nerve wrecking but rewarding experience, right? Because when you finally figure it out you’re like, “Yes!”
Iris: Do you use Fitbit yourself?
Barry: Yeah, I do. I have my fourth one right now.
Iris: He’s showing proof he’s wearing one. Are you wearing one on the other hand as well?
Barry: Not right now.
Iris: Have you noticed the difference in your level of exercise by wearing one?
Barry: Definitely the leader board here in the company is pretty addictive and there’s a lot of peer pressure to be more active and to get more steps. Definitely we all kind of know different people in the company. There’s a strata and there are few people that you know are always above 100,000 steps for the last week. You kind of end up with the people that are close to you that generally get the same amount of steps. I’m personally more in like the 70,000 range so then you’re just docking a position with those people that are more similar to you.
John: That makes sense. That’s funny. The one thing I love about that leader board is you can tell when someone went to Disney World. It’s like, “Did you take your kids to Disney World this weekend?” “Yeah, yep.” Okay, I could tell.
Iris: It’s not a small world after all. So what’s the next thing for Fitbit?
Barry: Well, I mean we have a research department who’s constantly doing research on new sensors and prototyping stuff and just figuring out what we can make work next. I think we’re about just any kind of sensor that we can get into a small unobtrusive package that has good battery life that can give you useful feedback on your personal health or fitness. There’s a lot we don’t do right now mostly because there are a lot of heart problems out there so it will be interesting to see what we get working. Nothing definite that I can tell you right now unfortunately.
Iris: Shoot. I was hoping for some secrets. I got a thing of piercings, so I’ve got to ask, are there any plans of any subdermal implants?
Barry: Not immediately, no but I mean that is interesting. We’ve definitely had conversations around that.
Iris: Permanent implants like on the hip. Is that the most accurate place to have a pedometer?
Barry: Yes, very much. A hip mounted pedometer is more or less exactly accurate. Once you start wearing it on your wrist it’s a lot more convenient but there is a lot of noise that gets introduced by just moving your hands around that isn’t there on your hip.
John: That’s true. When I’m cooking I tend to do pretty well in the steps especially when I’m mixing.
Iris: The question is it if it should count however somehow because you are using more energy. For example, if you were standing at your home and you’re folding clothes because you’ve done laundry. You’re not walking around but you’re definitely not sitting still. I don’t know. Maybe it’s not too bad if you can actually translate movement into steps and it’s not so much about steps just having to measure by. It depends on the hand movement as well, but yeah.
John: All right, anything you want to plug for Fitbit or anything interesting that you’ve got going on? What’s next for you?
Barry: I mean we have a lot of new features that we want to add to our mobile apps. We have just scratched the surface as far as social interaction goes with leader boards and messaging. There’s a lot more we could do there. There’s a lot more interesting stuff we’d like to do around data visualization. One interesting thing to me is the state of the data visualization tools available for mobile platforms. When you look at the web and Java script there’s a lot of really great libraries, but then when you look at just native Java or Objective-C there’s not a whole lot there and most of it is pretty static and not very interactive.
John: That’s true.
Barry: So I think there’s a lot that can be done in these touch screen user interface environments to have really engaging graphics and interactions there.
John: Awesome, cool. I would definitely like to be able to manipulate my data easier and just to really see that data in retrospect relative to other aspects of my life better. All right, well thanks for being on the show. Before I wrap this up I am going to remember our sponsor because we love our sponsors. SignalLeaf is our sponsor sponsoring our podcast, hosting us. If you go to signalleaf.com you can sign up and you can create your own podcast and SignalLeaf makes it really super easy to do. They’ve got some really affordable plans and really the best technology for creating a podcast and a lot of instruction on how to do this. Starting a podcast isn’t the easiest thing ever. So if you’re interested we need more developer podcast and just go to signalleaf.com.
We want to thank Barry again for coming on the show. It’s been great talking to you.
Barry: Thank you.
John: We’ll talk to everyone next week. Don’t forget to check us out at getupandcode.com and follow us on Twitter and all that stuff. One thing that we could use is a couple more ratings on iTunes. If you’re out there and get a chance, just pop onto iTunes, give us an honest rating. We’d really, really appreciate that so more people can find this show and get fit. Take care and we’ll talk to you next week.
Iris: See you later, bye.