While using the getStructuredDataList() method from the class com.samsung.android.sdk.healthdata.HealthDataUtil, a crash happens. This happens on a MotoX, Moto E4, and might happen on other devices but does not happen on a Pixel3a.
The crash log says:
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/gson/Gson;
The app that I work on is in the process of integrating with Samsung Health and this app uses the latest Samsung Health libraries:
In the PlayStore, this crash appears only on Moto devices, which leads us to believe that some Motorola phones do not include the GSON library in the OS. It appears that the Samsung Health SDK is assuming all Android phones include the GSON library in the OS; however, it seems like some Motorola phones do not bundle the GSON library in the OS.