javascript - I want to build a google api client builder for google fit api in javacript -


i trying build steps counter using google fit api, that, need connect fit api using google api client builder. can me this?

here link referred this link

and code is

const googleapiclient = com.google.android.gms.common.api.googleapiclient;     const locationservices = com.google.android.gms.fitness.fitness;     console.log('fitnes service************************', locationservices.sensors_api);     var apiclient = new googleapiclient.builder(app.android.context)         .addconnectioncallbacks(new googleapiclient.connectioncallbacks({             onconnected: function () {                  this.ready = true;                 this.notify({                     eventname: 'ready',                 });                 this.notify({                     eventname: '_googleapiclientconnected',                     object: this.googleapiclient                 });             }.bind(this),             onconnectionsuspended: function () {                  this.notify({                     eventname: '_googleapiclientconnectionsuspended',                     object: this.googleapiclient                 });             }.bind(this),         })).addonconnectionfailedlistener(new googleapiclient.onconnectionfailedlistener({             onconnectionfailed: function () {                  this.notify({                     eventname: '_googleapiclientconnectionfailed',                     object: this.googleapiclient                 });             }.bind(this),         }))         .addapi(locationservices.sensors_api)         .build();     console.log('+++++++++++++++++++++++++++++++++++++++++++++');     apiclient.connect();     console.log('api client ----------->', apiclient); 


Comments

Popular posts from this blog

vue.js - Create hooks for automated testing -

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

serial port - hub4com OVERRUN Error -