Detect Artifacts with Android SDK
Dear all,
I'm playing around with the Android SDK to understand how I can get the data, but I'm not able to obtain any of the artifacts, mostly blinking. I'm following the examples, and I've been able to read the data for all the other signals available.
This is the code. Could you help me locate why is not getting the artifacts?
EegArtifactChannel _eegArtifactChannel;
_eegArtifactChannel = new EegArtifactChannel(_eegChannelT3, _eegChannelT4, _eegChannelO1, _eegChannelO2);
_eegArtifactChannel.dataLengthChanged.subscribe(new INotificationCallback<Integer>() {
@Override
public void onNotify(Object sender, Integer nParam) {
int tt = _eegArtifactChannel.totalLength();
if (tt > 0) {
ArtifactZone[] artifactZones = _eegArtifactChannel.readData(tt - 1, 1);
if (artifactZones != null && artifactZones.length > 0) {
Log.d("ARTIFACT_CHANNEL", "Name: " + artifactZones[0].Type.name());
Log.d("ARTIFACT_CHANNEL", "Time: " + artifactZones[0].Time);
Log.d("ARTIFACT_CHANNEL", "Duration: " + artifactZones[0].Duration);
Log.d("ARTIFACT_CHANNEL", "Channels: " + Arrays.toString(artifactZones[0].Channels));
}
}
}
});
Many thanks!
Sergio
Edited by Sergio Garrido