This won't work if called before the cordova deviceready event.  Because the original event comes from cordova-webos code, you can't register for it this early.