Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Fit Api filter manually added activities

Google Fit allows users to add activities manually and programatically. Is it possible to filter out manually or programtically added activities from either the Android Api or the REST Api?

I want to query for only activities that were actually tracked and recorded at the time they were performed.

like image 825
Sam Leach Avatar asked Feb 11 '26 10:02

Sam Leach


1 Answers

There is no proper way according to the documentation. But I found some solution to identify manual and automatic tracked activities in Android API.

DataSource ds = DataPoint.getOriginalDataSource()
String streamData = ds.getStreamIdentifier()

If "streamData" contains "user_input", then it assumes the activities to be manual activities, either it contains "detailed" for actual sensor recorded activities.

like image 182
abdul khan Avatar answered Feb 13 '26 23:02

abdul khan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!