在浏览器控制台PhoneGap上未定义BackgroundGeolocation

时间:2019-03-22 19:31:55

标签: android geolocation phonegap-plugins phonegap

我遇到的问题是Android设备中未定义BackgoundGeolocation。

我确实检查了此链接。 BackgroundGeolocation is not working, is not defined

我的代码已经更新,并且插件也是如此。

它在IOS设备上运行正常,但在Android上却无法运行。 在浏览器控制台上,这表明未定义BackgroundGeolocation 拜托,有1个人可以帮我在android中使用它吗?

我正在使用PhoneGap。

我的代码是:

BackgroundGeolocation.configure({
            desiredAccuracy: BackgroundGeolocation.HIGH_ACCURACY,
            stationaryRadius: 50,
            distanceFilter: 50,
            notificationTitle: 'Background tracking',
            notificationText: 'enabled',
            debug: false,
            startOnBoot: true,
            stopOnTerminate: true,
            locationProvider: BackgroundGeolocation.DISTANCE_FILTER_PROVIDER,
            interval: 10000,
            fastestInterval: 5000,
            activitiesInterval: 10000,
            url: 'https://logistics-assist.com/ajax/update_loc.php',
            // customize post properties
            postTemplate: {
                driverid: user_array["uid"],
                lat: '@latitude',
                lon: '@longitude'
            }
        });
        BackgroundGeolocation.start();

0 个答案:

没有答案
相关问题