SlideShare a Scribd company logo
1 of 28
Download to read offline
Google Fit
FiNC.Inc Yuki Nanri
Introduction
What you can learn today
What is Google Fit
How Google Fit works
Use Case in FiNC
Implementation
Recruitment
Introduction
• Yuki Nanri (@neonankiti)
• Bison
• FiNC Android Developer
What is FiNC
Digital Healthcare Company
We have various specialists
such as doctors, pharmacists,
personal trainers,
nutritionists, researchers, and
engineers
Introduction
What you can learn today
What is Google Fit
How Google Fit works
Use Case in FiNC
Implementation
Recruitment
What you can learn today
Whole Picture of Google Fit
Introduction
What you can learn today
What is Google Fit
How Google Fit works
Use Case in FiNC
Implementation
Recruitment
What is Google Fit
The Healthcare Platform Sharing Data Through APIs
• aggregates Any Kind of Healthcare Data
• shares Them with APIs
• can Access from Multiple Platforms
• keeps Some Records automatically
Introduction
What you can learn today
What is Google Fit
How Google Fit works
Use Case in FiNC
Implementation
Recruitment
How Google Fit Works
reference: https://developers.google.com/fit/overview
Components
• The Fitness Store
• The Sensor Framework
• Permissions and User Controls
• Google Fit APIs
Main Components of Google Fit
Points of Today
Focus on Fitness APIs
reference: https://developers.google.com/fit/android/
• Sensor API
• Record API
• History API
• Session API
• Others(BLE, Config APIs)
Before Discussing APIs
There are 3 Fitness Data Types
• Public Data Types
• Private Custom Data Types
• Shareable Data Types
Fitness APIs
Sensor API
reference: https://developers.google.com/fit/android/
• read Raw Sensor in Real Time
• list Data Sources
• use Listeners
Fitness APIs
reference: https://developers.google.com/fit/android/
• store Data of Sensor by Subscriptions.
• use Multiple Subscriptions at the same time
• the Data Stored will be Here Used from History API
Record API
Fitness APIs
reference: https://developers.google.com/fit/android/
• can Use Reading, Inserting and Deleting Data
• can Use Synchronously and Asynchronously
• arrange Period Freely
History API
Fitness APIs
Session API
reference: https://developers.google.com/fit/android/
• create Session with Record API
• read Fitness Data Using Session
• show Sessions in Other Apps
• use Session Broadcast Intents
Preparation
reference: https://developers.google.com/fit/android/
• Install Google Play Services
• Get a Google Account
• Create an OAuth Client ID
• Register the Public Certificate
• Add Google Play Service in Build Gradle
• Enjoy Fit APIs !!
All You Have to Do is
Introduction
What you can learn today
What is Google Fit
How Google Fit works
Use Case in FiNC
Implementation
Recruitment
Use Case in FiNC
Many Tasks that Logs Users Health
Weight Sleeping Time Food
Introduction
What you can learn today
What is Google Fit
How Google Fit works
Use Case in FiNC
Implementation
Recruitment
Steps
Step2 Use Location API
Step1 Create Google API Client
• add API Types
• add Scopes(Permission)
• add Callbacks
Step1 Create Google API Client
private void buildFitnessClient() {

mClient = new GoogleApiClient.Builder(this)

// can add multiple api types

.addApi(Fitness.SENSORS_API)

.addApi(Fitness.RECORDING_API)

.addApi(Fitness.HISTORY_API)

// can add multiple scopes

.addScope(new Scope(Scopes.FITNESS_ACTIVITY_READ_WRITE))

.addScope(new Scope(Scopes.FITNESS_LOCATION_READ))

.addScope(new Scope(Scopes.FITNESS_ACTIVITY_READ_WRITE))

.addScope(new Scope(Scopes.FITNESS_BODY_READ_WRITE))

//

.addConnectionCallbacks(

new GoogleApiClient.ConnectionCallbacks() {



@Override

public void onConnected(Bundle bundle) {

Log.i(TAG, "Connected!!!");

// use fitness apis freely!!

}



@Override

public void onConnectionSuspended(int i) {

}

}

)

.addOnConnectionFailedListener(

new GoogleApiClient.OnConnectionFailedListener() {

// Called whenever the API client fails to connect.

@Override

public void onConnectionFailed(ConnectionResult result) {

}

}

)

.build();

}

Step2 Use Location API
Fitness.SensorsApi.findDataSources(mClient, new DataSourcesRequest.Builder()

// at least one datatype must be specified.

.setDataTypes(DataType.TYPE_LOCATION_SAMPLE)

.setDataSourceTypes(DataSource.TYPE_RAW)

.build())

.setResultCallback(new ResultCallback<DataSourcesResult>() {

@Override

public void onResult(DataSourcesResult dataSourcesResult) {


for (DataSource dataSource : dataSourcesResult.getDataSources()) {

Log.i(TAG, "Data source found: " + dataSource.toString());

Log.i(TAG, "Data Source type: " + dataSource.getDataType().getName());



if (dataSource.getDataType().equals(DataType.TYPE_LOCATION_SAMPLE)

&& mListener == null) {

Log.i(TAG, "Data source for LOCATION_SAMPLE found! Registering.");

registerFitnessDataListener(dataSource, DataType.TYPE_LOCATION_SAMPLE);

}

}


}

});
Step2 Use Location API
private OnDataPointListener mListener;
private float latitude, longitude, altitude, accuracy;


private void registerFitnessDataListener(DataSource dataSource, DataType dataType) {

mListener = new OnDataPointListener() {

@Override

public void onDataPoint(DataPoint dataPoint) {

for (Field field : dataPoint.getDataType().getFields()) {

final Value val = dataPoint.getValue(field);

Log.i(TAG, "Detected DataPoint field: " + field.getName());

Log.i(TAG, "Detected DataPoint value: " + val);

switch (field.getName()) {

case "latitude":

latitude = val.asFloat();

break;

case "longitude":

longitude = val.asFloat();

break;

case "altitude":

altitude = val.asFloat();

break;

case "accuracy":

accuracy = val.asFloat();

break;

}

}

runOnUiThread(new Runnable() {

@Override

public void run() {

latitudeView.setText(String.valueOf(latitude));

longitudeView.setText(String.valueOf(longitude));

altitudeView.setText(String.valueOf(altitude));

accuracyView.setText(String.valueOf(accuracy));

}

});

}

};

//register listener
Introduction
What you can learn today
What is Google Fit
How Google Fit works
Use Case in FiNC
Implementation
Recruitment
Recruitment
・Good knowledge of Android Application
・Strong Coding Skills and Computer Science
 Fundamentals
・Experience Shipping Products
ç
FiNC.Inc Yuki Nanri
Thank You

More Related Content

What's hot

Bayesian classification
Bayesian classificationBayesian classification
Bayesian classificationManu Chandel
 
Joel Schuweiler_AWS IAM Identity Center (Single Sign On).pptx
Joel Schuweiler_AWS IAM Identity Center (Single Sign On).pptxJoel Schuweiler_AWS IAM Identity Center (Single Sign On).pptx
Joel Schuweiler_AWS IAM Identity Center (Single Sign On).pptxAWS Chicago
 
Introduction to Google Cloud Services / Platforms
Introduction to Google Cloud Services / PlatformsIntroduction to Google Cloud Services / Platforms
Introduction to Google Cloud Services / PlatformsNilanchal
 
Build Text Analytics Solutions with Amazon Comprehend & Amazon Translate
Build Text Analytics Solutions with Amazon Comprehend & Amazon TranslateBuild Text Analytics Solutions with Amazon Comprehend & Amazon Translate
Build Text Analytics Solutions with Amazon Comprehend & Amazon TranslateAmazon Web Services
 
Google Cloud Platform Tutorial | GCP Fundamentals | Edureka
Google Cloud Platform Tutorial | GCP Fundamentals | EdurekaGoogle Cloud Platform Tutorial | GCP Fundamentals | Edureka
Google Cloud Platform Tutorial | GCP Fundamentals | EdurekaEdureka!
 
Meetup #4: AWS ELB Deep dive & Best practices
Meetup #4: AWS ELB Deep dive & Best practicesMeetup #4: AWS ELB Deep dive & Best practices
Meetup #4: AWS ELB Deep dive & Best practicesAWS Vietnam Community
 
Serverless computing with AWS Lambda
Serverless computing with AWS Lambda Serverless computing with AWS Lambda
Serverless computing with AWS Lambda Apigee | Google Cloud
 
Cloud Computing Forensic Science
 Cloud Computing Forensic Science  Cloud Computing Forensic Science
Cloud Computing Forensic Science David Sweigert
 
AWS SAM으로 서버리스 아키텍쳐 운영하기 - 이재면(마이뮤직테이스트) :: AWS Community Day 2020
AWS SAM으로 서버리스 아키텍쳐 운영하기 - 이재면(마이뮤직테이스트) :: AWS Community Day 2020 AWS SAM으로 서버리스 아키텍쳐 운영하기 - 이재면(마이뮤직테이스트) :: AWS Community Day 2020
AWS SAM으로 서버리스 아키텍쳐 운영하기 - 이재면(마이뮤직테이스트) :: AWS Community Day 2020 AWSKRUG - AWS한국사용자모임
 
05. k means clustering ( k-means 클러스터링)
05. k means clustering ( k-means 클러스터링)05. k means clustering ( k-means 클러스터링)
05. k means clustering ( k-means 클러스터링)Jeonghun Yoon
 
Spell checker for Kannada OCR
Spell checker for Kannada OCRSpell checker for Kannada OCR
Spell checker for Kannada OCRdbpublications
 
Amazon CloudWatch Tutorial | AWS Certification | Cloud Monitoring Tools | AWS...
Amazon CloudWatch Tutorial | AWS Certification | Cloud Monitoring Tools | AWS...Amazon CloudWatch Tutorial | AWS Certification | Cloud Monitoring Tools | AWS...
Amazon CloudWatch Tutorial | AWS Certification | Cloud Monitoring Tools | AWS...Edureka!
 
Amazon Web Services - Media Use Cases
Amazon Web Services  - Media Use CasesAmazon Web Services  - Media Use Cases
Amazon Web Services - Media Use CasesSantanu Dutt
 
AWS Lambda / Amazon API Gateway Deep Dive
AWS Lambda / Amazon API Gateway Deep DiveAWS Lambda / Amazon API Gateway Deep Dive
AWS Lambda / Amazon API Gateway Deep DiveKeisuke Nishitani
 
AWS Storage and Content Delivery Services
AWS Storage and Content Delivery ServicesAWS Storage and Content Delivery Services
AWS Storage and Content Delivery ServicesAmazon Web Services
 

What's hot (20)

Bayesian classification
Bayesian classificationBayesian classification
Bayesian classification
 
Joel Schuweiler_AWS IAM Identity Center (Single Sign On).pptx
Joel Schuweiler_AWS IAM Identity Center (Single Sign On).pptxJoel Schuweiler_AWS IAM Identity Center (Single Sign On).pptx
Joel Schuweiler_AWS IAM Identity Center (Single Sign On).pptx
 
Introduction to Google Cloud Services / Platforms
Introduction to Google Cloud Services / PlatformsIntroduction to Google Cloud Services / Platforms
Introduction to Google Cloud Services / Platforms
 
Build Text Analytics Solutions with Amazon Comprehend & Amazon Translate
Build Text Analytics Solutions with Amazon Comprehend & Amazon TranslateBuild Text Analytics Solutions with Amazon Comprehend & Amazon Translate
Build Text Analytics Solutions with Amazon Comprehend & Amazon Translate
 
Amazon ECS Deep Dive
Amazon ECS Deep DiveAmazon ECS Deep Dive
Amazon ECS Deep Dive
 
Google Cloud Platform Tutorial | GCP Fundamentals | Edureka
Google Cloud Platform Tutorial | GCP Fundamentals | EdurekaGoogle Cloud Platform Tutorial | GCP Fundamentals | Edureka
Google Cloud Platform Tutorial | GCP Fundamentals | Edureka
 
Basics of SAS
Basics of SASBasics of SAS
Basics of SAS
 
Meetup #4: AWS ELB Deep dive & Best practices
Meetup #4: AWS ELB Deep dive & Best practicesMeetup #4: AWS ELB Deep dive & Best practices
Meetup #4: AWS ELB Deep dive & Best practices
 
Developer Tools at AWS 2018.pdf
Developer Tools at AWS 2018.pdfDeveloper Tools at AWS 2018.pdf
Developer Tools at AWS 2018.pdf
 
What is AWS?
What is AWS?What is AWS?
What is AWS?
 
Serverless computing with AWS Lambda
Serverless computing with AWS Lambda Serverless computing with AWS Lambda
Serverless computing with AWS Lambda
 
Cloud Computing Forensic Science
 Cloud Computing Forensic Science  Cloud Computing Forensic Science
Cloud Computing Forensic Science
 
AWS SAM으로 서버리스 아키텍쳐 운영하기 - 이재면(마이뮤직테이스트) :: AWS Community Day 2020
AWS SAM으로 서버리스 아키텍쳐 운영하기 - 이재면(마이뮤직테이스트) :: AWS Community Day 2020 AWS SAM으로 서버리스 아키텍쳐 운영하기 - 이재면(마이뮤직테이스트) :: AWS Community Day 2020
AWS SAM으로 서버리스 아키텍쳐 운영하기 - 이재면(마이뮤직테이스트) :: AWS Community Day 2020
 
05. k means clustering ( k-means 클러스터링)
05. k means clustering ( k-means 클러스터링)05. k means clustering ( k-means 클러스터링)
05. k means clustering ( k-means 클러스터링)
 
Spell checker for Kannada OCR
Spell checker for Kannada OCRSpell checker for Kannada OCR
Spell checker for Kannada OCR
 
Amazon CloudWatch Tutorial | AWS Certification | Cloud Monitoring Tools | AWS...
Amazon CloudWatch Tutorial | AWS Certification | Cloud Monitoring Tools | AWS...Amazon CloudWatch Tutorial | AWS Certification | Cloud Monitoring Tools | AWS...
Amazon CloudWatch Tutorial | AWS Certification | Cloud Monitoring Tools | AWS...
 
SAS - overview of SAS
SAS - overview of SASSAS - overview of SAS
SAS - overview of SAS
 
Amazon Web Services - Media Use Cases
Amazon Web Services  - Media Use CasesAmazon Web Services  - Media Use Cases
Amazon Web Services - Media Use Cases
 
AWS Lambda / Amazon API Gateway Deep Dive
AWS Lambda / Amazon API Gateway Deep DiveAWS Lambda / Amazon API Gateway Deep Dive
AWS Lambda / Amazon API Gateway Deep Dive
 
AWS Storage and Content Delivery Services
AWS Storage and Content Delivery ServicesAWS Storage and Content Delivery Services
AWS Storage and Content Delivery Services
 

Similar to Android Google Fit

Google app engine
Google app engineGoogle app engine
Google app engineRenjith318
 
Fitbit-Final Presentation
Fitbit-Final PresentationFitbit-Final Presentation
Fitbit-Final PresentationAvik Das
 
Integrating GoogleFit into Android Apps
Integrating GoogleFit into Android AppsIntegrating GoogleFit into Android Apps
Integrating GoogleFit into Android AppsGiles Payne
 
Pearson Mobile App Development
Pearson Mobile App DevelopmentPearson Mobile App Development
Pearson Mobile App Developmentzpinter
 
Exploring the Google Analytics API
Exploring the Google Analytics APIExploring the Google Analytics API
Exploring the Google Analytics APIVanessa Sabino
 
Presentation Day2.pdf
Presentation Day2.pdfPresentation Day2.pdf
Presentation Day2.pdfAlaChihaoui1
 
#APIOps- Agile API Development powered by API Connect
#APIOps- Agile API Development powered by API Connect#APIOps- Agile API Development powered by API Connect
#APIOps- Agile API Development powered by API Connectpramodvallanur
 
모바일 앱 개발 최종 발표 Proposal
모바일 앱 개발 최종 발표 Proposal모바일 앱 개발 최종 발표 Proposal
모바일 앱 개발 최종 발표 ProposalMatthew Chang
 
Gits class #22: [ONLINE] Analyze Your User's Activities Using BigQuery and Da...
Gits class #22: [ONLINE] Analyze Your User's Activities Using BigQuery and Da...Gits class #22: [ONLINE] Analyze Your User's Activities Using BigQuery and Da...
Gits class #22: [ONLINE] Analyze Your User's Activities Using BigQuery and Da...GITS Indonesia
 
Accidental API developer - the 12 month pregnancy to create new API
Accidental API developer - the 12 month pregnancy to create new APIAccidental API developer - the 12 month pregnancy to create new API
Accidental API developer - the 12 month pregnancy to create new APIMarjukka Niinioja
 
Google IO 2017 Recap
Google IO 2017 RecapGoogle IO 2017 Recap
Google IO 2017 RecapVishal Nayak
 
What is new in Firebase?
What is new in Firebase?What is new in Firebase?
What is new in Firebase?Sinan Yılmaz
 
API Services: Building State-of-the-Art APIs
API Services: Building State-of-the-Art APIsAPI Services: Building State-of-the-Art APIs
API Services: Building State-of-the-Art APIsApigee | Google Cloud
 
Introduction to Digital Analytics for Apps - Trusted Conf
Introduction to Digital Analytics for Apps - Trusted ConfIntroduction to Digital Analytics for Apps - Trusted Conf
Introduction to Digital Analytics for Apps - Trusted ConfIn Marketing We Trust
 
Integrating consumers IoT devices into Business Workflow
Integrating consumers IoT devices into Business WorkflowIntegrating consumers IoT devices into Business Workflow
Integrating consumers IoT devices into Business WorkflowYakov Fain
 
Building Mobile (app) Masterpiece with Distributed Agile
Building Mobile (app) Masterpiece with Distributed AgileBuilding Mobile (app) Masterpiece with Distributed Agile
Building Mobile (app) Masterpiece with Distributed AgileWee Witthawaskul
 

Similar to Android Google Fit (20)

Google Fit
Google FitGoogle Fit
Google Fit
 
Google app engine
Google app engineGoogle app engine
Google app engine
 
Fitbit-Final Presentation
Fitbit-Final PresentationFitbit-Final Presentation
Fitbit-Final Presentation
 
Integrating GoogleFit into Android Apps
Integrating GoogleFit into Android AppsIntegrating GoogleFit into Android Apps
Integrating GoogleFit into Android Apps
 
Pearson Mobile App Development
Pearson Mobile App DevelopmentPearson Mobile App Development
Pearson Mobile App Development
 
Exploring the Google Analytics API
Exploring the Google Analytics APIExploring the Google Analytics API
Exploring the Google Analytics API
 
Fire up your mobile app!
Fire up your mobile app!Fire up your mobile app!
Fire up your mobile app!
 
Presentation Day2.pdf
Presentation Day2.pdfPresentation Day2.pdf
Presentation Day2.pdf
 
#APIOps- Agile API Development powered by API Connect
#APIOps- Agile API Development powered by API Connect#APIOps- Agile API Development powered by API Connect
#APIOps- Agile API Development powered by API Connect
 
모바일 앱 개발 최종 발표 Proposal
모바일 앱 개발 최종 발표 Proposal모바일 앱 개발 최종 발표 Proposal
모바일 앱 개발 최종 발표 Proposal
 
Gits class #22: [ONLINE] Analyze Your User's Activities Using BigQuery and Da...
Gits class #22: [ONLINE] Analyze Your User's Activities Using BigQuery and Da...Gits class #22: [ONLINE] Analyze Your User's Activities Using BigQuery and Da...
Gits class #22: [ONLINE] Analyze Your User's Activities Using BigQuery and Da...
 
Accidental API developer - the 12 month pregnancy to create new API
Accidental API developer - the 12 month pregnancy to create new APIAccidental API developer - the 12 month pregnancy to create new API
Accidental API developer - the 12 month pregnancy to create new API
 
Introduction to Google App Engine
Introduction to Google App EngineIntroduction to Google App Engine
Introduction to Google App Engine
 
Google IO 2017 Recap
Google IO 2017 RecapGoogle IO 2017 Recap
Google IO 2017 Recap
 
What is new in Firebase?
What is new in Firebase?What is new in Firebase?
What is new in Firebase?
 
API Services: Building State-of-the-Art APIs
API Services: Building State-of-the-Art APIsAPI Services: Building State-of-the-Art APIs
API Services: Building State-of-the-Art APIs
 
Introduction to Digital Analytics for Apps - Trusted Conf
Introduction to Digital Analytics for Apps - Trusted ConfIntroduction to Digital Analytics for Apps - Trusted Conf
Introduction to Digital Analytics for Apps - Trusted Conf
 
Integrating consumers IoT devices into Business Workflow
Integrating consumers IoT devices into Business WorkflowIntegrating consumers IoT devices into Business Workflow
Integrating consumers IoT devices into Business Workflow
 
Building Mobile (app) Masterpiece with Distributed Agile
Building Mobile (app) Masterpiece with Distributed AgileBuilding Mobile (app) Masterpiece with Distributed Agile
Building Mobile (app) Masterpiece with Distributed Agile
 
Introduction To Google Fit
Introduction To Google FitIntroduction To Google Fit
Introduction To Google Fit
 

Recently uploaded

DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Intelisync
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 

Recently uploaded (20)

Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 

Android Google Fit

  • 2. Introduction What you can learn today What is Google Fit How Google Fit works Use Case in FiNC Implementation Recruitment
  • 3. Introduction • Yuki Nanri (@neonankiti) • Bison • FiNC Android Developer
  • 4. What is FiNC Digital Healthcare Company We have various specialists such as doctors, pharmacists, personal trainers, nutritionists, researchers, and engineers
  • 5. Introduction What you can learn today What is Google Fit How Google Fit works Use Case in FiNC Implementation Recruitment
  • 6. What you can learn today Whole Picture of Google Fit
  • 7. Introduction What you can learn today What is Google Fit How Google Fit works Use Case in FiNC Implementation Recruitment
  • 8. What is Google Fit The Healthcare Platform Sharing Data Through APIs • aggregates Any Kind of Healthcare Data • shares Them with APIs • can Access from Multiple Platforms • keeps Some Records automatically
  • 9. Introduction What you can learn today What is Google Fit How Google Fit works Use Case in FiNC Implementation Recruitment
  • 10. How Google Fit Works reference: https://developers.google.com/fit/overview
  • 11. Components • The Fitness Store • The Sensor Framework • Permissions and User Controls • Google Fit APIs Main Components of Google Fit
  • 12. Points of Today Focus on Fitness APIs reference: https://developers.google.com/fit/android/ • Sensor API • Record API • History API • Session API • Others(BLE, Config APIs)
  • 13. Before Discussing APIs There are 3 Fitness Data Types • Public Data Types • Private Custom Data Types • Shareable Data Types
  • 14. Fitness APIs Sensor API reference: https://developers.google.com/fit/android/ • read Raw Sensor in Real Time • list Data Sources • use Listeners
  • 15. Fitness APIs reference: https://developers.google.com/fit/android/ • store Data of Sensor by Subscriptions. • use Multiple Subscriptions at the same time • the Data Stored will be Here Used from History API Record API
  • 16. Fitness APIs reference: https://developers.google.com/fit/android/ • can Use Reading, Inserting and Deleting Data • can Use Synchronously and Asynchronously • arrange Period Freely History API
  • 17. Fitness APIs Session API reference: https://developers.google.com/fit/android/ • create Session with Record API • read Fitness Data Using Session • show Sessions in Other Apps • use Session Broadcast Intents
  • 18. Preparation reference: https://developers.google.com/fit/android/ • Install Google Play Services • Get a Google Account • Create an OAuth Client ID • Register the Public Certificate • Add Google Play Service in Build Gradle • Enjoy Fit APIs !! All You Have to Do is
  • 19. Introduction What you can learn today What is Google Fit How Google Fit works Use Case in FiNC Implementation Recruitment
  • 20. Use Case in FiNC Many Tasks that Logs Users Health Weight Sleeping Time Food
  • 21. Introduction What you can learn today What is Google Fit How Google Fit works Use Case in FiNC Implementation Recruitment
  • 22. Steps Step2 Use Location API Step1 Create Google API Client • add API Types • add Scopes(Permission) • add Callbacks
  • 23. Step1 Create Google API Client private void buildFitnessClient() {
 mClient = new GoogleApiClient.Builder(this)
 // can add multiple api types
 .addApi(Fitness.SENSORS_API)
 .addApi(Fitness.RECORDING_API)
 .addApi(Fitness.HISTORY_API)
 // can add multiple scopes
 .addScope(new Scope(Scopes.FITNESS_ACTIVITY_READ_WRITE))
 .addScope(new Scope(Scopes.FITNESS_LOCATION_READ))
 .addScope(new Scope(Scopes.FITNESS_ACTIVITY_READ_WRITE))
 .addScope(new Scope(Scopes.FITNESS_BODY_READ_WRITE))
 //
 .addConnectionCallbacks(
 new GoogleApiClient.ConnectionCallbacks() {
 
 @Override
 public void onConnected(Bundle bundle) {
 Log.i(TAG, "Connected!!!");
 // use fitness apis freely!!
 }
 
 @Override
 public void onConnectionSuspended(int i) {
 }
 }
 )
 .addOnConnectionFailedListener(
 new GoogleApiClient.OnConnectionFailedListener() {
 // Called whenever the API client fails to connect.
 @Override
 public void onConnectionFailed(ConnectionResult result) {
 }
 }
 )
 .build();
 }

  • 24. Step2 Use Location API Fitness.SensorsApi.findDataSources(mClient, new DataSourcesRequest.Builder()
 // at least one datatype must be specified.
 .setDataTypes(DataType.TYPE_LOCATION_SAMPLE)
 .setDataSourceTypes(DataSource.TYPE_RAW)
 .build())
 .setResultCallback(new ResultCallback<DataSourcesResult>() {
 @Override
 public void onResult(DataSourcesResult dataSourcesResult) { 
 for (DataSource dataSource : dataSourcesResult.getDataSources()) {
 Log.i(TAG, "Data source found: " + dataSource.toString());
 Log.i(TAG, "Data Source type: " + dataSource.getDataType().getName());
 
 if (dataSource.getDataType().equals(DataType.TYPE_LOCATION_SAMPLE)
 && mListener == null) {
 Log.i(TAG, "Data source for LOCATION_SAMPLE found! Registering.");
 registerFitnessDataListener(dataSource, DataType.TYPE_LOCATION_SAMPLE);
 }
 } 
 }
 });
  • 25. Step2 Use Location API private OnDataPointListener mListener; private float latitude, longitude, altitude, accuracy; 
 private void registerFitnessDataListener(DataSource dataSource, DataType dataType) {
 mListener = new OnDataPointListener() {
 @Override
 public void onDataPoint(DataPoint dataPoint) {
 for (Field field : dataPoint.getDataType().getFields()) {
 final Value val = dataPoint.getValue(field);
 Log.i(TAG, "Detected DataPoint field: " + field.getName());
 Log.i(TAG, "Detected DataPoint value: " + val);
 switch (field.getName()) {
 case "latitude":
 latitude = val.asFloat();
 break;
 case "longitude":
 longitude = val.asFloat();
 break;
 case "altitude":
 altitude = val.asFloat();
 break;
 case "accuracy":
 accuracy = val.asFloat();
 break;
 }
 }
 runOnUiThread(new Runnable() {
 @Override
 public void run() {
 latitudeView.setText(String.valueOf(latitude));
 longitudeView.setText(String.valueOf(longitude));
 altitudeView.setText(String.valueOf(altitude));
 accuracyView.setText(String.valueOf(accuracy));
 }
 });
 }
 };
 //register listener
  • 26. Introduction What you can learn today What is Google Fit How Google Fit works Use Case in FiNC Implementation Recruitment
  • 27. Recruitment ・Good knowledge of Android Application ・Strong Coding Skills and Computer Science  Fundamentals ・Experience Shipping Products