Reader small image

You're reading from  Android Sensor Programming By Example

Product typeBook
Published inApr 2016
Reading LevelBeginner
PublisherPackt
ISBN-139781785285509
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Varun Nagpal
Varun Nagpal
author image
Varun Nagpal

Varun Nagpal has been developing mobile apps since 2005 and has developed and contributed to more than 100 professional apps and games on various platforms, such as Android, iOS, Blackberry, and J2ME. Android app development has been his main area of expertise, and he has developed apps for a wide variety of Android devices, such as Android phones, tablets, watches, smart TVs, Android Auto, and Google Glass. He moved to Chicago in late 2013, and since then, he has become a seasoned mobile architect. He has worked in different roles (mobile architect, technical lead, senior developer, and technical consultant) for a variety of various global clients (Allstate, Verizon, AT&T, Sydbank Denmark, SiS Taiwan, Chams PLC Nigeria, and Nandos South Africa) in order to implement their mobile solutions. He has SCJP (Core Java) and SCWD (JSP and Servlets) certifications from Sun Microsystems and MCP (C#) and MCTS (ASP.NET) certifications from Microsoft. You can find his blogs on mobile technology and white papers written by him on his website at http://www.varunnagpal.com/. When he's not working, Varun can be found meditating or playing the flute. He also loves to develop meditation apps and fun games in his free time. He has developed about 40 meditation apps and games available on Google Play (https://play.google.com/store/apps/developer?id=Creative.Software.Studio) and the Apple App Store (https://itunes.apple.com/us/artist/creative-software-studio/id574745824) under the name of Creative Software Studio, his part-time start-up company (http://creativesoftwarestudio.com/).
Read more about Varun Nagpal

Right arrow

Time for action – working with live fitness data using the Sensors API


The Sensors API is provided to work with a live stream of fitness sensor data. It can provide data from sensors on local or connected devices. The Sensors API is a part of Google play services and can be connected using the GoogleApiClient class. In SensorActivity, we first add the required scopes and Sensors API and then connect to Google play services using an object of the GoogleApiClient class. The steps for connecting to Google play services via the GoogleApiClient class are explained in the first section of the driving event detection application of the bonus chapter, Sensor Fusion and Sensors-Based APIs – The Driving Events Detection App, during the discussion on the activity recognition API. The only difference in steps is that, instead of adding activity recognition API; we have to add Sensors API. Now let's look at the individual tasks performed by SensorActivity:

  1. The first task performed by SensorActivity is...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Android Sensor Programming By Example
Published in: Apr 2016Publisher: PacktISBN-13: 9781785285509

Author (1)

author image
Varun Nagpal

Varun Nagpal has been developing mobile apps since 2005 and has developed and contributed to more than 100 professional apps and games on various platforms, such as Android, iOS, Blackberry, and J2ME. Android app development has been his main area of expertise, and he has developed apps for a wide variety of Android devices, such as Android phones, tablets, watches, smart TVs, Android Auto, and Google Glass. He moved to Chicago in late 2013, and since then, he has become a seasoned mobile architect. He has worked in different roles (mobile architect, technical lead, senior developer, and technical consultant) for a variety of various global clients (Allstate, Verizon, AT&T, Sydbank Denmark, SiS Taiwan, Chams PLC Nigeria, and Nandos South Africa) in order to implement their mobile solutions. He has SCJP (Core Java) and SCWD (JSP and Servlets) certifications from Sun Microsystems and MCP (C#) and MCTS (ASP.NET) certifications from Microsoft. You can find his blogs on mobile technology and white papers written by him on his website at http://www.varunnagpal.com/. When he's not working, Varun can be found meditating or playing the flute. He also loves to develop meditation apps and fun games in his free time. He has developed about 40 meditation apps and games available on Google Play (https://play.google.com/store/apps/developer?id=Creative.Software.Studio) and the Apple App Store (https://itunes.apple.com/us/artist/creative-software-studio/id574745824) under the name of Creative Software Studio, his part-time start-up company (http://creativesoftwarestudio.com/).
Read more about Varun Nagpal