-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It works only at the first time. #749
Comments
You must not execute any plugin method which requests the location until the callback to bgGeo.ready(config, function(state) {
if (!state.enabled) {
bgGeo.start(); // <-- YES
}
});
bgGeo.start(); // <-- NO! You must wait until #ready callback. You were warned about this in the README. |
I changed my code,but It is not still working.
} |
still working only at the first time. |
Define "working". See Debugging wiki. |
When my device call the function -bgeo.start(), my device detects location and send the data to my server. |
Are you watching the logs? The plugin is telling you everything it's doing.
Read the Debugging wiki. |
After I call the function bgeo.start(); and shaking for a while at foreground and teriminate my app, my device can detect location and send the data to my server. No log is written any more... |
This is correct. See docs for
When you terminate an Android app, your ENTIRE Javascript is terminated. Obviously if you're using Javascript event-listeners upon the plugin, those will no longer fire. This is why the plugin has its own persistence and HTTP services -- so it can continue to post locations to your server after the Android app has been terminated. |
Sorry, I can't understand why you make me see the docs which is about stopOnTerminate. |
Because you terminated your app.
Go for a walk |
It seems like my device can not detect location without "EnableHeadlessMode :true". But After shaking for a while at the first time, without "EnableHeadlessMode:true" my device can detect loction even in the background |
Forget about shaking and forget about |
What do you mean? -- "Listen to the plugin beep" |
|
Because the “beep” means a location was recorded. If a location was recorded, a location was posted to your url. If a location is posted to your url, you have no problem. |
Sorry, It was 3 AM in my country, I felt sleepy and did fall a sleep. |
There is nothing unusual about those log messages. Removing / re-adding platform has no effect on the behaviour of the plugin. I doubt you have any issue at all until you show me a log file after traveling 1km. |
I did that ( removing and add platform) to change my configure such as changing activityRecognitionInterval from10000 to 5000. --- I doubt you have any issue at all until you show me a log file after traveling 1km. |
Stop asking questions and get out of the office. Go for a long fieldtest. Fetch your logfile after. |
This is my SampleApp today after terminating the app. |
Sorry for asking too much questions. You are my only the one teacher. I tried several times walking around my house but I will try more times. After that I will send the log file to you. |
You don’t test by walking around the office. You test by walking hundreds of meters. |
I got it. I will try it.
2018년 8월 16일 (목) 오전 9:31, Chris Scott <notifications@github.com>님이 작성:
… You don’t test by walking around the office. You test by walking hundreds
of meters.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#749 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Ak95nxqtBvUBh-Xlgjsl2vugflW0G1Q2ks5uRL18gaJpZM4V-Ge8>
.
|
Thank you for your advise
2018년 8월 16일 (목) 오전 9:33, 편재식 <vuswotlr@gmail.com>님이 작성:
… I got it. I will try it.
2018년 8월 16일 (목) 오전 9:31, Chris Scott ***@***.***>님이 작성:
> You don’t test by walking around the office. You test by walking hundreds
> of meters.
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#749 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/Ak95nxqtBvUBh-Xlgjsl2vugflW0G1Q2ks5uRL18gaJpZM4V-Ge8>
> .
>
|
I walked around hundreds of meter.
|
Your Environment
Plugin version:
"cordova-android": "^7.0.0",
"cordova-background-geolocation-lt": "^2.12.2",
"cordova-plugin-background-fetch": "^5.4.1",
"cordova-plugin-camera": "^4.0.3",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-file": "^6.0.1",
"cordova-plugin-file-transfer": "^1.7.1",
"cordova-plugin-firebase": "^1.0.5",
"cordova-plugin-geolocation": "^4.0.1",
"cordova-plugin-ionic-keyboard": "^2.1.2",
"cordova-plugin-request-location-accuracy": "^2.2.3",
"cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-whitelist": "^1.3.3",
"cordova.plugins.diagnostic": "^4.0.8"
Platform: iOS or Android: Android
OS version: Mac
Device manufacturer / model: galaxy A5
Cordova version (
cordova -v
): 8.0.0Cordova platform version (
cordova platform ls
):android 7.0.0
Available platforms:
browser ~5.0.1
ios ~4.5.4
osx ~4.0.1
windows ~5.0.0
www ^3.12.0
Plugin config
Context
It works only at the first time. ( bgeo.strart();)
following is my code
Debug logs
The text was updated successfully, but these errors were encountered: