Skip to content
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

[Help Wanted]: Debug mode stops when I started to move and update my location #1415

Open
2 of 3 tasks
EMorales-2025 opened this issue Jan 28, 2025 · 6 comments
Open
2 of 3 tasks

Comments

@EMorales-2025
Copy link

Required Reading

  • Confirmed

Plugin Version

4.16.6

Mobile operating-system(s)

  • iOS
  • Android

What do you require assistance about?

We are trying to implement the transistor services, we already follow the steps from the documentation, and we are making some tests in Debug mode, when we close our app or having it on second plane when we are on the same place without moving the terminal show some messages and it seems that transistor is working correctly, but when we start moving the debug pauses and crashes, we are making the debug tests on a physical device, but we are having that problem.

The physical device is a Samsung Galaxy A05. All the tests that I´ve made is on debug mode using the physical device that I already especified.

What can I do in that case? I´m making the tests on the free layer.

[Optional] Plugin Code and/or Config

bg.BackgroundGeolocation.onLocation((bg.Location location){

    });
    bg.BackgroundGeolocation.onMotionChange((bg.Location location){

    });
    bg.BackgroundGeolocation.onProviderChange((bg.ProviderChangeEvent event){

    });
    bg.BackgroundGeolocation.onActivityChange((bg.ActivityChangeEvent event){

    });
    bg.BackgroundGeolocation.onHeartbeat((bg.HeartbeatEvent event){

    });
    bg.BackgroundGeolocation.onGeofence((bg.GeofenceEvent event){

    });
    bg.BackgroundGeolocation.onGeofencesChange((bg.GeofencesChangeEvent event){

    });
    bg.BackgroundGeolocation.ready(bg.Config(
      desiredAccuracy : bg.Config.DESIRED_ACCURACY_HIGH,
      distanceFilter: 10.0,
      stopOnTerminate: false,
      startOnBoot: true,
      debug: true,
      logLevel: bg.Config.LOG_LEVEL_VERBOSE
    )).then((bg.State state){
      if(!state.enabled){
        bg.BackgroundGeolocation.start();
      }
    });


Some Messages that my terminal show when I locked the phone:

SLocationManager(  586): [c.t.l.scheduler.ScheduleEvent a]
 
I/TSLocationManager(  586): ╔═════════════════════════════════════════════
 
I/TSLocationManager(  586): ║ ⏰ OneShot event fired: TERMINATE_EVENT
 
I/TSLocationManager(  586): ╠═════════════════════════════════════════════
 
D/TSLocationManager(  586): [c.t.l.event.TerminateEvent$a onChange]
 
D/TSLocationManager(  586):   ℹ️  TERMINATE_EVENT ignored (MainActivity is still active).
 
4
 
D/TSLocationManager(  586): [c.t.l.service.AbstractService a]
 
D/TSLocationManager(  586):   🎾  start [TrackingService  startId: 109, eventCount: 1]
 
D/TSLocationManager(  586): [c.t.l.service.TrackingService c]
 
D/TSLocationManager(  586): ╔═════════════════════════════════════════════
 
D/TSLocationManager(  586):TrackingService: LocationResult
 
D/TSLocationManager(  586): ╠═════════════════════════════════════════════
  
D/TSLocationManager(  586): ╟─ Age: 212ms, time: 1738007626968
 
D/TSLocationManager(  586): [c.t.l.l.TSLocationManager onLocationResult]

[Optional] Relevant log output

@christocracy
Copy link
Member

but when we start moving the debug pauses and crashes

What evidence do you have of a crash? When an app crashes, the first thing I do is fetch the stacktrace, showing exactly what crashed and where. There is always a stacktrace.

@EMorales-2025
Copy link
Author

EMorales-2025 commented Jan 30, 2025 via email

@christocracy
Copy link
Member

If you have a crash, provide the stacktrace. Otherwise, there’s no evidence that this plug-in is at fault (it could be your own code or some other plug-in responsible).

@EMorales-2025
Copy link
Author

EMorales-2025 commented Jan 30, 2025 via email

@christocracy
Copy link
Member

when our users close the app or when they lock the phone, will still update the location of our users?

See api docs Config.stopOnTerminate

@christocracy
Copy link
Member

What is your question about the logs you’ve shown?

The plug-in has its own built-in http service which can post to any url you wish. See api docs Configuration.url (also see “HTTP Guide”, linked throughout the api docs)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants