| Found the reason for this problem. We call "requestOn" method of the request object here: https://github.com/aerogear/aerogear-android-sdk/blob/4215aa854b71d29dd31cf6827119169fef1ec40a/core/src/main/java/org/aerogear/mobile/core/bootstrap/AeroGearBootstrap.java#L23 But, not with security metrics: https://github.com/aerogear/aerogear-android-sdk/blob/4215aa854b71d29dd31cf6827119169fef1ec40a/security/src/main/java/org/aerogear/mobile/security/SecurityCheckMetricPublisher.java#L37 Simply doing the same would make it working:
try{ |
metricsService.publish(SecurityService.SECURITY_METRICS_EVENT_TYPE, new SecurityCheckResultMetric(metricResults)) |
.requestOn(new AppExecutors().mainThread()) |
.respondWith(new Responder<Boolean>() { |
@Override |
public void onResult(Boolean value) { |
MobileCore.getLogger().info("Security metrics sent"); |
} |
|
@Override |
public void onException(Exception exception) { |
MobileCore.getLogger().error(exception.getMessage(), exception); |
} |
}); |
} catch(){...}
|
I will send a PR later in the evening or tomorrow morning. Summers Pittman David Martin BTW, I see no tag on the Android showcase template. Is that alright? |