Android Error: Connection lost (underlying error: std::exception)


#1

Currently I am running the muse.runAsync task inside my surfaceCreated method. It runs for about 10 seconds and is responsive but then i get and exception.

The demo app runs fine for me on my Nexus 6. The connection does not drop. But in the application I am creating it always drops after what seems like a set amount of time (under 10 seconds)

@Override [B]public void [/B]surfaceCreated(SurfaceHolder holder) {
[B]…
try [/B]{
[B]muse[/B].runAsynchronously();
} [B]catch [/B](Exception e) { Log.[I]e[/I]([B]“Muse Headband”[/B], e.toString()); }

Error:
02-03 11:00:35.529 21439-21475/com.matthewschwegler.musepong I/System.out: Inside updateAccelerometer!
02-03 11:00:35.549 21439-21475/com.matthewschwegler.musepong I/System.out: Inside receiveMuseDataPacket!
02-03 11:00:35.550 21439-21475/com.matthewschwegler.musepong W/libmuse native: Connection lost (underlying error: std::exception)
02-03 11:00:35.551 21439-21475/com.matthewschwegler.musepong I/Muse Headband: Muse 00:06:66:70:0B:31 CONNECTED -> DISCONNECTED