use of com.crashlytics.android.answers.CustomEvent in project SightRemote by TebbeUbben.
the class AppLayerProcessor method onOutboundMessage.
@Override
public void onOutboundMessage(Object message, Pipeline pipeline) throws Exception {
if (!(message instanceof AppLayerMessage))
return;
Log.d("SightService", "SEND: " + message.getClass());
DataMessage dataMessage = new DataMessage();
dataMessage.setData(((AppLayerMessage) message).serialize());
pipeline.send(dataMessage);
Answers.getInstance().logCustom(new CustomEvent("Sent Application Layer Message").putCustomAttribute("Message", message.getClass().getSimpleName()));
}
use of com.crashlytics.android.answers.CustomEvent in project SightRemote by TebbeUbben.
the class AppLayerProcessor method onInboundMessage.
@Override
public void onInboundMessage(Object message, Pipeline pipeline) throws Exception {
if (!(message instanceof DataMessage))
return;
DataMessage dataMessage = (DataMessage) message;
ByteBuf byteBuf = new ByteBuf(dataMessage.getData().length);
byteBuf.putBytes(dataMessage.getData());
AppLayerMessage appLayerMessage = AppLayerMessage.deserialize(byteBuf);
Log.d("SightService", "RECEIVE: " + appLayerMessage.getClass());
pipeline.receive(appLayerMessage);
Answers.getInstance().logCustom(new CustomEvent("Received Application Layer Message").putCustomAttribute("Message", appLayerMessage.getClass().getSimpleName()));
}
use of com.crashlytics.android.answers.CustomEvent in project SightRemote by TebbeUbben.
the class TemporaryBasalRateActivity method onResult.
@Override
public void onResult(Object result) {
if (result instanceof PumpStatusMessage) {
PumpStatusMessage pumpStatusMessage = (PumpStatusMessage) result;
if (pumpStatusMessage.getPumpStatus() != PumpStatus.STARTED) {
showManualOverlay();
hideLoadingIndicator();
showSnackbar(Snackbar.make(getRootView(), R.string.pump_not_started, Snackbar.LENGTH_INDEFINITE));
} else {
hideLoadingIndicator();
hideManualOverlay();
dismissSnackbar();
}
} else {
Answers.getInstance().logCustom(new CustomEvent("TBR Programmed"));
finish();
}
}
Aggregations