tryterra / TerraAndroid

Android Library to connect to Google Fit, Samsung Health, and FreeStyleLibre!
5 stars 0 forks source link

readGlucoseData error #1

Open q601180252 opened 1 year ago

q601180252 commented 1 year ago
 manager.readGlucoseData(new Function1<FSLSensorDetails, Unit>() {
                @Override
                public Unit invoke(FSLSensorDetails fslSensorDetails) {
                    Log.e("Terra", fslSensorDetails.toString());
                    return null;
                }
            });

android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity  context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
    at android.app.ContextImpl.startActivity(ContextImpl.java:912)
    at android.app.ContextImpl.startActivity(ContextImpl.java:888)
    at android.content.ContextWrapper.startActivity(ContextWrapper.java:379)
    at co.tryterra.terra.TerraManager.readGlucoseData(Terra.kt:532)