Can't get location by cordova-background-geolocation

Hello,i add cordova-background-geolocation version 2.13.0 to my app and build successful. when i use:

bgGeo = (window).BackgroundGeolocation;

bgGeo.getCurrentPosition((location, taskid) => {}, error => {}, {}

=> ERROR TypeError: Cannot read property ‘getCurrentPosition’ of undefined.

Does anybody have an idea or solution for this?

my ioic infor
Ionic:

ionic (Ionic CLI) : 4.5.0 (C:\Users\quang\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : ionic-angular 3.3.0
@ionic/app-scripts : 3.2.4

Cordova:

cordova (Cordova CLI) : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : android 6.3.0
Cordova Plugins : no whitelisted plugins (12 plugins total)

System:

Android SDK Tools : 26.1.1 (E:\Android\SDK)
NodeJS : v8.9.4 (C:\Program Files (x86)\nodejs\node.exe)
npm : 5.6.0
OS : Windows 10
Installed platforms:
android 6.3.0
Available platforms:
browser ^6.0.0
electron ^1.0.0
ios ^5.0.0
osx ^5.0.0
windows ^7.0.0

which version you are using share link

i use cordova-background-geolocation version 2.13.0