make sure the callback can know device ready has actually been called (cordova vs non-cordova context)