GithubHelp home page GithubHelp logo

Comments (19)

goddib avatar goddib commented on August 16, 2024 2

For lack of a better place I want to thank you right here @bfabiszewski for continuing work on ulogger. This bug fix was very important to keep the tool usable. I know you're limited in time and ulogger is not your focus so I just wanted to tell you that I appreaciate fixing this. Thanks!

from ulogger-android.

bfabiszewski avatar bfabiszewski commented on August 16, 2024 1

You are right, of course. Sorry for not providing sources.
It would be best if you build it yourself.

Just pushed it in separate branch
https://github.com/bfabiszewski/ulogger-android/tree/foreground-services

from ulogger-android.

bfabiszewski avatar bfabiszewski commented on August 16, 2024

Thanks for the report!
Unfortunately there are limitations for background jobs in newer APIs.
I will have to find a solution, only need some free time :)

from ulogger-android.

r100gs avatar r100gs commented on August 16, 2024

Yes, time is always a problem. If you need sb testing the app you can write me.

from ulogger-android.

ArchGalileu avatar ArchGalileu commented on August 16, 2024

for me also, no background....

is it possible to solve?

Best regards
ArchGalileu

from ulogger-android.

ArchGalileu avatar ArchGalileu commented on August 16, 2024

Can we try something as:
https://medium.com/mindorks/enable-background-services-in-chinese-roms-32e73dfba1a6

Best regards
ArchGalileu

from ulogger-android.

bfabiszewski avatar bfabiszewski commented on August 16, 2024

I converted background service into foreground one. It is difficult for me to test it without device. In emulator even previous version seems to work properly. So I am attaching here new build for testing. Maybe @r100gs or @ArchGalileu could test it in background?

app-debug.apk.zip

from ulogger-android.

bfabiszewski avatar bfabiszewski commented on August 16, 2024

@ArchGalileu
In Chinese ROMs, sometimes you have to give extra permissions to the application. I recently had an issue with Android 6 with MIUI, which needed explicit permission for extra battery usage in background: "Settings -> Additional Settings -> Battery -> Manage apps battery usage".

from ulogger-android.

anaqreon avatar anaqreon commented on August 16, 2024

I just discovered uLogger yesterday on F-droid and am very impressed with it. Within twenty minutes I had downloaded the Android app and server source code repos, compiled the Android app, setup the uLogger server, and was tracking my phone's location in the web app! The documentation was clear and everything just worked. Thanks for your hard work @bfabiszewski .

Unfortunately I discovered that background location updates are also broken for me. I am running uLogger Android app version 1.8 on LineageOS 15 (Android 8.1.0) on a Nexus 5X. I made sure that background activity was enabled and that "Battery Optimization" is disabled for the uLogger app. Hopefully someone can determine how to implement the background service compatible with more recent Android versions.

from ulogger-android.

bfabiszewski avatar bfabiszewski commented on August 16, 2024

@anaqreon
Could you try the beta version I uploaded earlier in this thread?
It should solve the background service issue.

from ulogger-android.

anaqreon avatar anaqreon commented on August 16, 2024

I might be able to try that, yes. Can you share the source code for it too? I'm new to Android development and I'd like to see what you changed.

from ulogger-android.

anaqreon avatar anaqreon commented on August 16, 2024

I downloaded the app you linked above and it appears to be updating in the background as advertised. Nice! Is this from a branch accessible within this git repo?

from ulogger-android.

bfabiszewski avatar bfabiszewski commented on August 16, 2024

I understand it seems to be working for you. Great!
I will have to do some more cleanup before merging and making new release. While targeting higher API I had to quit support for older versions. I'll have to remove depreciated and unused code.

In the meantime, if you find any problems with this beta version, please let me know.
Thanks for testing!

from ulogger-android.

anaqreon avatar anaqreon commented on August 16, 2024

This is how open source software is supposed to work. You worked hard to make something useful and generously shared it with the world. Some random guy probably on the other side of the planet discovers your code, provides some useful feedback, and the code improves and there is even more transparency as a result. Keep up the good work!

from ulogger-android.

anaqreon avatar anaqreon commented on August 16, 2024

Today I've been using the app compiled from the foreground-services branch you pushed, and I discovered that it was not working reliably until I disabled "Battery Optimization" in the Android app settings for the uLoggger app. That is, when I uninstalled the original version and installed the new one, Android applied the battery optimization to it by default, which meant that it was getting killed when in the background after some amount of time. Now it appears to reliably update positions no matter how long it is in the background. I'll provide more feedback if further testing shows different behavior.

from ulogger-android.

bfabiszewski avatar bfabiszewski commented on August 16, 2024

Thanks for feedback!
It is normal that you need to reenable permissions when installing app from different source.
Good to hear that it still works!

from ulogger-android.

anaqreon avatar anaqreon commented on August 16, 2024

I researched this battery optimization issue a bit more. By requesting another permission, you can allow the app to request that the user disable battery optimization without leaving the app. There is some example code from the Syncthing app that could provide an example for uLogger.

from ulogger-android.

bfabiszewski avatar bfabiszewski commented on August 16, 2024

Nice find! I'll have to add it to uLogger.

Now, I am going to close this issue, as the bug seems to be resolved in 2.0 release.
In case you find new problems regarding background jobs, you may reopen it.

from ulogger-android.

roydenyates avatar roydenyates commented on August 16, 2024

Consider re-opening this please. Just changed phone and now running Lineage OS 15 (Android 8.1) on a Bq Aquaris X, having previously been on CM13 on another brand. uLogger worked very well previously. Locally stored track matched the one uploaded to server. Now, under Android 8.1 and uLogger from this thread or latest from f-droid, the uploaded track has just 37 of the 137 locally logged fixes.

So, background logging is not a problem; as it stands now under Android 8.1, background access by uLogger to the data link seems to be an issue.

Thanks.

from ulogger-android.

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.