Android Phonegap call to OpenGL ES API with no current context (logged once per thread) Error

When using Phonegap on Android I was getting this OpenGL error somewhat randomly in my camera application.
Turns out the problem was that hardware acceleration is turned off by default.

Error I was getting

"call to OpenGL ES API with no current context (logged once per thread)"

After I added android:hardwareAccelerated="true" in AndroidManifest.xml, it works fine to me.

Android Phonegap crash on rotate

I found this from here http://stackoverflow.com/questions/9045933/phonegap-app-crashes-when-switched-orientation-even-with-androidmanifest-changes

change the following line on manifest xml file

<activity android:configChanges=”orientation|keyboardHidden”
android:name=”.MyPhoneGapActivity”
android:label=”@string/app_name” >

to

</pre>
<activity android:configChanges="orientation|screenSize|keyboardHidden"

android:name=".MyPhoneGapActivity"
 android:label="@string/app_name" >
<pre>

Now if you rotate the device , your app will stay awake.