Giter Site home page Giter Site logo

Comments (22)

toufiqpathan avatar toufiqpathan commented on May 25, 2024

Hi @christocracy,UAE customers are facing this issue. Is the plugin not working for any specific zone? Please help me with this ASAP.

from cordova-background-geolocation-lt.

christocracy avatar christocracy commented on May 25, 2024

java.lang.ClassNotFoundException: driverconnect.latitude247.BackgroundGeolocationHeadlessTask

Your problem has nothing to do with geography. You failed to properly configure your headless-task class.

See api docs Config.enableHeadless.

from cordova-background-geolocation-lt.

toufiqpathan avatar toufiqpathan commented on May 25, 2024

HI @christocracy ,

Thanks for your response, i have add the enableHeadless as true in ready function, still activity is getting kill, here is adb logcat
logs.txt

from cordova-background-geolocation-lt.

christocracy avatar christocracy commented on May 25, 2024

There's far more to enabling headless mode than enableHeadless: true.

You have to create a custom Java class. It is a very advanced feature requiring careful attention to following the Setup Instructions, as detailed in the api docs.

from cordova-background-geolocation-lt.

toufiqpathan avatar toufiqpathan commented on May 25, 2024

yeah i have created the java class file
Class

from cordova-background-geolocation-lt.

christocracy avatar christocracy commented on May 25, 2024

That's your BackgroundFetch headless task.

What about the BackgroundGeolocation headless task?

from cordova-background-geolocation-lt.

toufiqpathan avatar toufiqpathan commented on May 25, 2024

shall i create BackgroundGeolocation headless task in the same folder?

from cordova-background-geolocation-lt.

christocracy avatar christocracy commented on May 25, 2024

Just follow the api docs Config.headlessTask for each plugin."

from cordova-background-geolocation-lt.

toufiqpathan avatar toufiqpathan commented on May 25, 2024

Followed the api doc for headlessTask, still getting the error attached the logs
logs.txt

from cordova-background-geolocation-lt.

christocracy avatar christocracy commented on May 25, 2024

System.err: Caused by: java.lang.ClassNotFoundException: Didn't find class "driverconnect.latitude247.BackgroundGeolocationHeadlessTask"

from cordova-background-geolocation-lt.

toufiqpathan avatar toufiqpathan commented on May 25, 2024

In BackgroundGeolocationHeadlessTask class file, do we need to update the package name?

from cordova-background-geolocation-lt.

christocracy avatar christocracy commented on May 25, 2024

What do the Setup Instructions tell you to do?

from cordova-background-geolocation-lt.

christocracy avatar christocracy commented on May 25, 2024

image

from cordova-background-geolocation-lt.

toufiqpathan avatar toufiqpathan commented on May 25, 2024

i am not getting any error, but still activity is getting closed
logs.txt
Uploading logs.txt…

from cordova-background-geolocation-lt.

christocracy avatar christocracy commented on May 25, 2024

I don't see any problems coming from the plug-in. See wiki "Debugging" and learn to use verbose logging

from cordova-background-geolocation-lt.

toufiqpathan avatar toufiqpathan commented on May 25, 2024

Hi @christocracy , here is the verbose logs, when i put application in the background.
logs.txt

from cordova-background-geolocation-lt.

christocracy avatar christocracy commented on May 25, 2024

I suggest you comment-out all plug-in code except for the call to .ready(config).

Those don't look anything like the plug-in's verbose logs. The plug-in's verbose logs are very colorful with heavy use of emojis.

from cordova-background-geolocation-lt.

christocracy avatar christocracy commented on May 25, 2024

See api docs Config.logLevel.

READ the wiki "Debugging"

from cordova-background-geolocation-lt.

toufiqpathan avatar toufiqpathan commented on May 25, 2024

here is the verbose loglevel with 5
logs.txt

from cordova-background-geolocation-lt.

christocracy avatar christocracy commented on May 25, 2024

I told you to disable everything but .ready. Your .watchPosition code is still running!

Also, what are you doing in your headless task?

from cordova-background-geolocation-lt.

toufiqpathan avatar toufiqpathan commented on May 25, 2024

I have commented out the other parts of the code except for '.ready,' and in the headless task, I have implemented exactly what is documented in the API, without adding any additional code to the 'headlesstask.java' file.
HeadlessTasktxt.txt
logs.txt

from cordova-background-geolocation-lt.

christocracy avatar christocracy commented on May 25, 2024

I see no issue with the plug-in. It is not responsible for you app being terminated. There is no exception raised and the plug-in headless-task happily runs.

I suggest you create yourself a simple hello-world app and experiment using the plug-in in isolation.

from cordova-background-geolocation-lt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.