comment 0

Using Retrofit to control the Spark Core

As I briefly mentioned on my previous post, I’m building my first Android app to use the Spark Core as a Wake-on-LAN relay inside my network. I started out using DefaultHttpClient but quickly came across Retrofit. I have to say I’m very impressed with the API, its flexibility and ease-of-use. I was able to quickly prototype the following interface, which allows me to flash an arbitrary firmware, invoke methods and retrieve variables very easily:

If you’re trying to build a similar app, feel free to take a look at the complete source at GitHub. A Google Play Store submission is on its way and will be available here.

Filed under: IoT, OSS

About the Author

Posted by

Go Core Team Lead @ Status.im (remote), previously Windows Team Lead @ Plex (remote), Architect, Codebase Whisperer, DevOps enthusiast, Continuous Learner