Cordovaプラグインが提供するAPIはdevicereadyイベントが発生した後で利用できます。
Cordovaプラグインが提供するAPIを使用した初期化処理などは、devicereadyイベントのリスナーから呼び出される関数内で行ってください。
document.addEventListener('deviceready', onDeviceReady, false); function onDeviceReady() { // 初期化処理 }