I tried, as suggested by Amit above, but
DataPoint.getOriginalDataSource().getStreamIdentifier(); DataPoint.getOriginalDataSource().getStreamName(); DataPoint.getOriginalDataSource().getAppPackageName();
did not work at least for me when receiving data. I ended up using readDailyTotalFromLocalDevice (), as shown below, to capture the steps captured only by the device.
Fitness.HistoryApi.readDailyTotalFromLocalDevice(mApiClient, DataType.TYPE_STEP_COUNT_DELTA).await(1, TimeUnit.MINUTES)
I double-checked the same with some applications that avoid manual entries in their application, and the amount provided by the function above is exactly the same.
Note. If the user uses several devices and uses the application on all of them, readDailyTotalFromLocalDevice () will have a different value for each device, since the function is only responsible for returning device-specific data.
source share