Search code examples
androidopencvgoogle-glass

Open CV loads only when app is connected through Eclipse- Android


I am having a Google glass app that uses open CV for image processing.The app works fine when connected to Eclipse through USB. When I remove the USB and run the app on the glass, open CV does not seem to load.I get a blank screen, the app does not crash either(I have added crash reports to my app, I dont get any logs).Once I plug in the USB again, open CV loads and I get the output from where I had left the app.

Here is my project properties

target=Google Inc.:Glass Development Kit Preview:19
android.library.reference.1=../../../../OpenCV-2.4.7.1-android-sdk/sdk/java

enter image description here

I am completely clueless of why this is happening.Also I am not able to debug it since it works fine when connected through USB to Eclipse.


Solution

  • I guess this is a bug in Google glass GDK. My debug points were not getting detected so i had to use android.os.Debug.waitForDebugger();to debug my app. Even after being deployed onto the device glass waits for debugger and freezes.Once I removed that line, it works.