Android API Tutorial Series

Hi all,

I've put together a basic tutorial series for the MetaWear Android API. A while back I got a message from one of the users on this forum asking more about some code I wrote combining accelerometer and gyroscope data, and it got me thinking that I should document what I've been learning. For developers like me, who don't have a background in Android (or iOS), I think it can be a bit of a jump from the documentation to the sample app. I've tried to bridge that gap in this series. Hope it helps, and apologies in advance for any errors!


Cheers,

Chris

Comments

  • Wow!  This is a very detailed guide, going beyond just a HowTo for MetaWear.  The guide looks pretty solid to me; I only have two nitpicks.

    First, you can stream and log the same signal.  As you mentioned, its not a recommended use case but neither the api nor firmware stop you from doing so if you need or want to.

    Second, I noticed your code examples only wrapped the getModule calls in try-catch blocks and not the rest of the code.  The getModule function is marked with a checked exception because no board contains all modules.  Your code should handle this case and writing code in this manner completely disregards the purpose of exceptions.

    However, I can understand that if you are developing on one type of board, then you would already know what modules are present thus doing exception handling for a function that will never throw one is meaningless.  Down the line, I would like to add a getModule variant that doesn't throw an exception for those users.

    All in all, nice job and thanks for writing this up for the community.
This discussion has been closed.