Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Android Sensor Programming By Example

You're reading from  Android Sensor Programming By Example

Product type Book
Published in Apr 2016
Publisher Packt
ISBN-13 9781785285509
Pages 194 pages
Edition 1st Edition
Languages
Author (1):
Varun Nagpal Varun Nagpal
Profile icon Varun Nagpal

Table of Contents (13) Chapters

Android Sensor Programming By Example
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Sensor Fundamentals 2. Playing with Sensors 3. The Environmental Sensors – The Weather Utility App 4. The Light and Proximity Sensors 5. The Motion, Position, and Fingerprint Sensors 6. The Step Counter and Detector Sensors – The Pedometer App 7. The Google Fit Platform and APIs – The Fitness Tracker App

Authorization and permission scopes


User authorization is required before your application can read or write any fitness sensor data. User authorization is a two-step process. Step one is the registration of your application with the Google developer console, which is done outside your application. Step two is getting authorization from the user by using relevant scopes inside your application.

Registration with the Google developer console

Every application that needs to access fitness sensor data needs to register with the Google developer console. The followings steps explain the registration process:

  1. Open the Google developer console in any browser.
  2. Create a project from the console and enter your project name, which could be the same or different from your application name.
  3. Find the Fitness API from the APIs and Auth console menu and turn it on. Now Fitness API should appear at the top of your API list.
  4. Go to the Credential console menu and click on Create a new Client ID. This will open...
lock icon The rest of the chapter is locked
arrow left Previous Chapter
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime}