pls, guide me how to add client id to my project. I added signInWithGoogleAsync() function to my component :
import React from 'react' ;
import Expo from "expo";
import { Pedometer } from "expo";
import { StyleSheet, Text, View } from 'react-native';
import { giveSteps,giveStepsPast } from '../actions'
import { connect } from 'react-redux';
import { ShowCircles } from '../components/ShowCircles'
import reducer from '../reducers';
async function signInWithGoogleAsync() {
try {
const result = await Expo.Google.logInAsync({
androidClientId: "1111111111111111111111111111111111111111111111111111111",
scopes: ['profile', 'email']
});
if (result.type === 'success') {
return result.accessToken;
} else {
return {cancelled: true};
}
} catch(e) {
return {error: true};
}
}
class GetPedometer extends React.Component {
state = {
isPedometerAvailable : "checking"
}
componentDidMount() {
this._subscribe();
signInWithGoogleAsync();
}
componentWillUnmount() {
this._unsubscribe();
}
_subscribe = () => {
this._subscription = Pedometer.watchStepCount(result => {
this.props.dispatch(giveSteps(result.steps));
});
Pedometer.isAvailableAsync().then(
result => {
this.setState({
isPedometerAvailable: String(result)
});
return String(result);
},
error => {
this.setState({
isPedometerAvailable: "Could not get isPedometerAvailable: " + error
});
return error
}
);
const end = new Date();
const start = new Date();
start.setDate(end.getDate() - 1);
Pedometer.getStepCountAsync(start, end).then(
result => {
// this.setState({ pastStepCount: result.steps });
this.props.dispatch(giveStepsPast(result.steps));
},
error => {
// this.setState({
// pastStepCount: "Could not get stepCount: " + error
// });
}
);
};
_unsubscribe = () => {
this._subscription && this._subscription.remove();
this._subscription = null;
};
render() {
return(
<View>
<Text> {this.state.isPedometerAvailable} </Text>
<Text> pedometer </Text>
</View>
)
}
}
GetPedometer = connect()(GetPedometer);
export default GetPedometer;
const styles = StyleSheet.create({
container: {
flex : 1,
justifyContent: 'center'
},
});
but received this error on my android device.