Closed Swapniltdatalogy closed 6 years ago
Logs please
Actually ,I build application with phone gap build , so can't able to give logs.
Yes you can. The plugin records logs to its own database. See Logging Methods and #getLog
don't send logs as an image. The logs can sometimes be > 1MB!
Just connect your app to Safari developer console and manually execute bg.getLog(callback)
. Copy / paste the output to a file and attach the file here to the issue.
Or use put a button on your UI to execute emailLog
I'm trying to send mail but it throw error-> No mail Accounts.Please set up mail account in order to send mail
So set up an email account.
Email logs { "isMoving": false, "enabled": true, "odometer": 0, "schedulerEnabled": false, "trackingMode": "location", "distanceFilter": 5, "desiredAccuracy": 0, "desiredOdometerAccuracy": 100, "locationUpdateInterval": 1000, "fastestLocationUpdateInterval": 10000, "locationTimeout": 60, "deferTime": 0, "disableElasticity": false, "activityRecognitionInterval": 10000, "minimumActivityRecognitionConfidence": 75, "triggerActivities": "in_vehicle, on_bicycle, on_foot, running, walking", "disableStopDetection": false, "stationaryRadius": 25, "stopTimeout": 5, "stopOnStationary": false, "url": "http:\/\/www.umbra.org\/umbra-app\/umbra-api\/11umbra-testing-api.php?callback=JSON_CALLBACK¶m=trackUserLocation&user_id=0&lat=0&longni=0", "method": "POST", "autoSync": true, "autoSyncThreshold": 0, "batchSync": false, "maxBatchSize": -1, "params": { "auth_token": "maybe_your_server_authenticates_via_token_YES", "userid": "235", "devicedate": null }, "headers": {}, "extras": {}, "httpRootProperty": "location", "locationTemplate": "", "geofenceTemplate": "", "persist": true, "maxDaysToPersist": 3, "maxRecordsToPersist": -1, "locationsOrderDirection": "ASC", "httpTimeout": 60000, "geofenceProximityRadius": 1000, "geofenceInitialTriggerEntry": true, "stopOnTerminate": false, "startOnBoot": true, "heartbeatInterval": 60, "foregroundService": false, "notificationTitle": "", "notificationText": "Location Service activated", "notificationColor": "", "notificationIcon": "", "notificationSmallIcon": "", "notificationLargeIcon": "", "forceReloadOnLocationChange": false, "forceReloadOnMotionChange": false, "forceReloadOnGeofence": false, "forceReloadOnBoot": false, "forceReloadOnHeartbeat": false, "forceReloadOnSchedule": false, "stopAfterElapsedMinutes": 0, "schedule": [], "configureUrl": "", "configureInterval": -1, "debug": true, "logLevel": 5, "logMaxDays": 3 }
There are no logs attached. This is only the config.
Please carefully read the requirements for emailLog
on Android:
The following permissions are required in your AndroidManifest.xml in order to attach the .log file to the email:
<manifest>
<application>
...
</application>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
</manifest>
Grant "Storage" permission Settings->Apps->[Your App]->Permissions: (o) Storage
Please find attachment
configure logLevel: 5
and try again.
There, that's better.
I see no issue here. Of course locations will differ slightly every time you request a getCurrentPosition
. You can see the reported accuracy of your locations 50
, 30
, 10
, 10
. Location recorded while indoors will naturally have poorer accuracy than those recorded outside, since GPS only works while outside. Indoor accuracy is typically 40-60 meters.
Unrelated, but your device is of poor quality for the type of tracking this plugin does, since it's has no gyroscope or magnetometer (compass). The plugin will have difficultly with motion-detection, which is a crucial for the plugin to detect when the device is moving / stationary. The activity-type reported by the plugin (ie: on_foot
, in_vehicle
, on_bicycle
) will be highly inaccurate.
This has nothing to do with accuracy of locations, which are unaffected by motion-sensors.
╔═════════════════════════════════════════════
║ DEVICE SENSORS
╠═════════════════════════════════════════════
╟─ ✅ ACCELEROMETER: {Sensor name="K2HH Acceleration ", vendor="STM", version=1, type=1, maxRange=39.2266, resolution=0.0011971008, power=0.13, minDelay=10000}
╟─ ⚠️ GYROSCOPE: none. Motion-detection system performance will be degraded
╟─ ⚠️ MAGNETOMETER: none. Motion-detection system performance will be degraded
╟─ ⚠️ SIGNIFICANT_MOTION: none. Motion-detection system performance will be degraded
╚═════════════════════════════════════════════
Please do not post long logs to the thread, forcing one to scroll 10 meters to get to bottom of page. attach them as files.
Please check this file for IOS background-geolocation.zip
What seems to be the problem in last logs? Is this a Wifi-only iPad?
Yes
Obviously performance on a Wifi-only device will be poor since there's no GPS on those devices.
What seems to be the problem in last logs? Is this a Wifi-only iPad? NO there have. GPS .
I don't see a problem in the logs. What are the symptoms?
But difference of latitude and longitude is more than 100-200 meters. Still device in stationary?
Yes, look at the location being recorded. It has an accuracy of 200
meters. This location is the best that device could provide at that particular location.
<+21.14949744,+79.11137715> +/- 200.00m (speed 0.00 mps / course -1.00) @ 7/18/17, 6:54:46 PM India Standard Time
There is no issue here.
Correction. At 18:54:35
, you did a getCurrentPosition
2017-07-18 18:54:35.300 - updateCurrentPosition: {
}
2017-07-18 18:54:35.301 🎾-[LocationManager startUpdatingLocation] ON
2017-07-18 18:54:35.323 ℹ️+[LocationAuthorization run:] status: 3
2017-07-18 18:54:35.331
<+21.14944862,+79.11144117> +/- 65.00m (speed -1.00 mps / course -1.00) @ 7/18/17, 6:53:34 PM India Standard Time
2017-07-18 18:54:35.332
╔═══════════════════════════════════════════════════════════
║ -[LocationManager locationManager:didUpdateLocations:] Sample 1 of 3
╚═══════════════════════════════════════════════════════════
2017-07-18 18:54:35.336 ✅ [BackgroundTaskManager createBackgroundTask]: 10
2017-07-18 18:54:35.783
<+21.14950364,+79.11137709> +/- 65.00m (speed -1.00 mps / course -1.00) @ 7/18/17, 6:54:35 PM India Standard Time
2017-07-18 18:54:35.783
╔═══════════════════════════════════════════════════════════
║ -[LocationManager locationManager:didUpdateLocations:] Sample 2 of 3
╚═══════════════════════════════════════════════════════════
2017-07-18 18:54:35.788 ✅ [BackgroundTaskManager createBackgroundTask]: 11
2017-07-18 18:54:41.311
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/0 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2017-07-18 18:54:41.311 - Shake count: 0
2017-07-18 18:54:41.312 🔴-[SOMotionDetector stopShakeDetection] OFF
2017-07-18 18:54:41.313 🎾-[SOMotionDetector startShakeDetection:] sample-rate: 1.0 | M7 DISABLED
2017-07-18 18:54:46.323
<+21.14949744,+79.11137715> +/- 200.00m (speed 0.00 mps / course -1.00) @ 7/18/17, 6:54:46 PM India Standard Time
2017-07-18 18:54:46.323 🔴-[LocationManager stopUpdatingLocation] OFF
2017-07-18 18:54:46.326
╔═══════════════════════════════════════════════════════════
║ -[LocationManager locationManager:didUpdateLocations:] Sample 3 of 3
╚═══════════════════════════════════════════════════════════
2017-07-18 18:54:46.327 - Median location accuracy: 65.0
3 samples were requested:
Only the best sample is returned to the getCurrentPosition
callback. However, all samples are provided to the location
event. These samples will have sample: true
appended to the location data. These sample
s are not persisted to the database.
See the note about "samples" in the getCurrentPosition docs:
ℹ️ While the successFn will receive only one location, the plugin does request multiple location samples in order to record the most accurate location possible. These samples are not persisted to the database but they will be provided to your location event-listener, for your convenience, since it can take some seconds for the best possible location to arrive. For example, you might use these samples to progressively update the user's position on a map. You can detect these samples in your location callbackFn via location.sample === true. If you're manually POSTing location to your server, you should ignore these locations.
Hello christocracy , Is there any option to detect location is off or on and suggest user to on location(GPS) .when our app is completely close.?
The plugin automatically records and posts a location with event: "providerchange"
, appending the current provider
data when user modifies location-services settings. See providerchange event.
Please stay on topic. Your issue is titled "Not getting same latitude and longitude , when phone is statitionary "
Ok sorry for other topic "Not getting same latitude and longitude , when phone is stationary " . still not getting same latitude and longitude . is any option missing from below config.
bgGeo.configure({
// Geolocation config
desiredAccuracy: 100,
distanceFilter: 10,
stationaryRadius: 25,
// Activity Recognition config
activityRecognitionInterval: 10000,
stopTimeout: 5,
// Application config
// debug: true, // <-- Debug sounds & notifications.
stopOnTerminate: false,
// logLevel :5,
startOnBoot: true,
preventSuspend: true,
// HTTP / SQLite config
url: "http://www.umbra.org/umbra-app/umbra-api/11umbra-testing-api.php?callback=JSON_CALLBACK¶m=trackUserLocation&user_id=0&lat="+lat+"&longni="+lng,
method: "POST",
autoSync: true,
desiredOdometerAccuracy: 10,
maxDaysToPersist: 3,
heartbeatInterval: 180,
params: {
"auth_token": "maybe_your_server_authenticates_via_token_YES",
"userid":window.localStorage.getItem('user_id'),
"devicedate":window.localStorage.getItem('devicedate')
}
}, function(state) {
// alert('start one two three');
if (!state.enabled) {
if(window.localStorage.getItem('user_id') == '' || window.localStorage.getItem('user_id') == null || window.localStorage.getItem('user_id') == undefined )
{
bgGeo.start();
}
}
});
You won't get the same lat/lng. It's to be expected that the location will change at any given moment, particularly while indoors, the location vary by tens-of-meters.
Also, what do you expect when you've configured desiredAccuracy: 100?
There is no issue here.
On Wed, Jul 19, 2017 at 6:45 AM Swapniltdatalogy notifications@github.com wrote:
Ok sorry for other topic "Not getting same latitude and longitude , when phone is stationary " . still not getting same latitude and longitude . is any option missing from below config. bgGeo.configure({ // Geolocation config desiredAccuracy: 100, distanceFilter: 10,
stationaryRadius: 25, // Activity Recognition config activityRecognitionInterval: 10000, stopTimeout: 5, // Application config
// debug: true, // <-- Debug sounds & notifications. stopOnTerminate: false, // logLevel :5,
startOnBoot: true, preventSuspend: true, // HTTP / SQLite config url: " http://www.umbra.org/umbra-app/umbra-api/11umbra-testing-api.php?callback=JSON_CALLBACK¶m=trackUserLocation&user_id=0&lat="+lat+"&longni="+lng http://www.umbra.org/umbra-app/umbra-api/11umbra-testing-api.php?callback=JSON_CALLBACK¶m=trackUserLocation&user_id=0&lat=%22+lat+%22&longni=%22+lng , method: "POST", autoSync: true,
desiredOdometerAccuracy: 10, maxDaysToPersist: 3, heartbeatInterval: 180,
params: { "auth_token": "maybe_your_server_authenticates_via_token_YES", "userid":window.localStorage.getItem('user_id'), "devicedate":window.localStorage.getItem('devicedate') }
}, function(state) { // alert('start one two three'); if (!state.enabled) { if(window.localStorage.getItem('user_id') == '' || window.localStorage.getItem('user_id') == null || window.localStorage.getItem('user_id') == undefined ) { bgGeo.start(); }
}
});
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/transistorsoft/cordova-background-geolocation-lt/issues/405#issuecomment-316346375, or mute the thread https://github.com/notifications/unsubscribe-auth/AAA6l6ILKiNr_pqZplEgWu0D9A39KuXyks5sPd46gaJpZM4ObL2k .
-- Snet form Gmail Mobile
I checked with desiredAccuracy : 0 also but not getting same result.
What exactly are you expecting?
I'm not at all surprised the location varies by 40-200 meters when you're sitting indoors.
Okay
Thanks for your help.
Hello Chris, bgGeo.configure({ // Geolocation config desiredAccuracy: 0, distanceFilter: 5, stationaryRadius: 25, // Activity Recognition config activityRecognitionInterval: 10000, stopTimeout: 5, // Application config //debug: true, // <-- Debug sounds & notifications. stopOnTerminate: false, startOnBoot: true, preventSuspend: true, // HTTP / SQLite config url: "http://www.umbra.org/umbra-app/umbra-api/11umbra-testing-api.php?callback=JSON_CALLBACK¶m=trackUserLocation&user_id=0&lat="+lat+"&longni="+lng, method: "POST", autoSync: true, maxDaysToPersist: 3, heartbeatInterval: 60, params: {
"auth_token": "maybe_your_server_authenticates_via_token_YES", "userid":window.localStorage.getItem('user_id'), "devicedate":window.localStorage.getItem('devicedate') }
This is my configuration . I implement heartbeat event after 1 min it work like charm .but im in my office with my ipad in stationary position .but every minute it takes different latitude and longitude . database schema for latitude and longitude . Please check screen shot -> https://www.screencast.com/t/lltCnL3W
Your Environment
cordova -v
):cordova platform ls
):Expected Behavior
Actual Behavior
Steps to Reproduce
1. 2. 3. 4.
Context
Debug logs