GithubHelp home page GithubHelp logo

bfabiszewski / ulogger-android Goto Github PK

View Code? Open in Web Editor NEW
295.0 22.0 55.0 1.65 MB

μlogger • android application for real-time collection and publishing of geolocation data

License: GNU General Public License v3.0

Java 100.00%
android-application location gps logger

ulogger-android's Introduction

ulogger_logo_small μlogger Build Status Coverity Status

μlogger [micro-logger] is an android application for continuous logging of location coordinates, designed to record hiking, biking tracks and other outdoor activities. Application works in background. Track points are saved automatically at chosen intervals or manually and may be uploaded to dedicated server in real time. This client works with μlogger web server. Together they make a complete self owned and controlled client–server solution.

Download

Download from f-droid

Features

  • meant to be simple and small (μ)
  • low memory and battery impact
  • focus on privacy, doesn't use Google Play services, logs to self-owned server
  • uses GPS or network based location data
  • synchronizes location with web server in real time, in case of problems keeps retrying
  • alternatively works in offline mode; positions may be uploaded to the servers manually
  • allows adding waypoints with attached images and comments (required μlogger server version 1.0+ for synchronization)
  • configurable tracking settings
  • export to GPX format
  • self-check screen for basic diagnostics
  • automation

Screenshots

main waypoint settings

Self-check

In case of problems, you may go to Self-check menu. It will check whether all necessary permissions are granted and all settings are properly configured.

self-check

Help

  • μlogger's current status is shown by two leds, one for location tracking and one for web synchronization:
led tracking synchronization
status green on, recently updated synchronized
status yellow on, long time since last update synchronization delay
status red off synchronization error
  • clicking on current track's name will show track statistics

Automating

  • μlogger may accept commands from other applications for starting or stopping its operations. To make it work you must explicitly enable this functionality in app settings ("Allow external commands" switch).
  • commands are sent as broadcasts with following intent parameters:
    • target package: net.fabiszewski.ulogger
    • target class: net.fabiszewski.ulogger.ExternalCommandReceiver
    • action: net.fabiszewski.ulogger.intent.action.COMMAND
    • extra:
      • command: [command name] (string value), where command name is one of:
        • "start logger" for starting position logging
        • "start new logger" for creating a new track and starting position logging to it
        • "stop logger" for stopping position logging
        • "start upload" for starting track data upload to server (in case live tracking is off)
      • overwrite: [true|false] (boolean value), optional parameter for start new logger command:
        • true (default) to ignore not synchronized track and overwrite it with new one
        • false to abort if creating new track would overwrite not synchronized positions
  • third party examples:
    • Automate (LlamaLab) – Send broadcast block with Package, Receiver Class and Action fields as above and Extras field eg. {"command": "start logger"}
    • Tasker (joaomgcd) – System → Send intent. Fields Action, Package, Class as above and Extra field eg. command:start logger
  • command line: am broadcast -a net.fabiszewski.ulogger.intent.action.COMMAND --es command "start new logger" --ez overwrite false net.fabiszewski.ulogger net.fabiszewski.ulogger.ExternalCommandReceiver

Location permissions

Starting with Android 11, if you want to use the application without user interaction (automating, autostart on boot), it is necessary to grant application background location permission ("Allow all the time" option). In case of automation the controlling application must also have the same background location permission granted. In all other cases, when you start tracking from app screen, it is enough to grant "Allow only while using the app" option.

Battery optimization

For reliable work battery optimization should be turned off for µlogger. Otherwise location service working in the background may be stopped by the operating system. On Android 12+ the application will refuse to start from background without user interaction (automation, autostart) with battery optimization turned on.

App settings guidelines

Finding the optimized settings for your practice can be a bit complex and may require you to do a lot of testing. As a first approach, here are some parameters that offer a good compromise between precision and the number of points acquired by your server.

Activity Time Distance Accuracy Provider
hiking/cycling 30 seconds 100m 100m GPS + Network
motorbiking 1 minute 500m 50m GPS + Network

They may not be optimal, depending on your feelings, and you will have to adapt them.

Contribute translations

Translate with transifex

Donate

Donate paypal
Donate bitcoin bc1qt3uwhze9x8tj6v73c587gprhufg9uur0rzxhvh
Donate ethereum 0x100C31C781C8124661413ed6d1AA9B1e2328fFA2
Donate dash Xb6X3zwLMgc3QQDNbeYmsqSwn2pofH2vXT

License

License: GPL 3.0

ulogger-android's People

Contributors

amadeous avatar bfabiszewski avatar carelinus avatar dvdcr avatar elfantin avatar francrodriguez avatar naofum avatar nortio avatar rahra avatar thieume avatar tiefkuehlpizze avatar valdnet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ulogger-android's Issues

feature request: export gpx file on device

Hi, would you please add (1) a button and (1) a scriptable intent to export all the data fields of the current, non-synced track as a gpx file?

The use case is: completely offline, 24/7, network location tracking. I.e. I'm not using a ulogger server at all. Occasionally, I'd like to view the track in Osmand, or run scripts to figure out when I'm at work etc. (I'm so glad there's finally a location tracker that does not insist on GPS.)

Why that? Offline -> privacy (and easier firewall config). 24/7 -> quantified self. Network location -> battery drain, indoors a lot. No ulogger server -> questions like "look where I took the kids" or "which way is usually faster" typically arise away from the computer (and easier setup).

Version info, everything from FDroid: ulogger 1.0. MicroG 0.2.4 stable, backends LocalGsmNlpBackend + LocalWifiNlpBackend + OpenBmapNlpBackend current stable versions with offline database. Android 6.0.1 Slimrom.

bug: recording fails silently if no location permission

Steps to reproduce:
Configure network+GPS location sources. Disallow location permission in system settings -> apps -> ulogger -> permissions. Start recording a new (offline) track.

Observed behavior:
There is no error message whatsoever. No data is recorded.

Expected behavior:
A notification / toast / popup should appear when locating fails for any permanent reason.

Verison info, everything from FDroid: ulogger 1.0. MicroG 0.2.4 stable, backends LocalGsmNlpBackend + LocalWifiNlpBackend + OpenBmapNlpBackend current stable versions with offline database.
Android 6.0.1 slimrom.

iOS App Alternative

Hey Mate!
Do you or anyone else happen to know of an iOS alternative that will achieve the same as this app with the ulogger server?
Cheers!

Dynamic GPS requests

Hi,

It would be nice if the App would request GPS position dynamic with higer frequency if I move or request it if the WLAN/GSM Net is changed. If I don't move the requests could be less often.

So I would have a more exact Tracking and Battery save if I sleep oder when I'm at Work. Currently the App polls every 1m for a new Position

FR restart track after update

Thank you very much for ulogger on F-Droid!

I wonder if ulogger could automatically start again logging the current track after an update. At the moment this track has to be started manually after every update. Autostart is activated already, but doesn't work if the phone is not rebooted.

Thank you in advance!

[Feature] Add a way to send automatic location when battery is <5-10% etc

It would be great to be able to have an option to enable an automatic feature that only sends the location when the phone gets low on battery. To not get to heavy on the battery, maybe there could be some options for only one location update, or on a slow interval.
This could also be achived by tasker integration with start / stop record location? (but probably heavier on battery?)
Thanks for the great program. Is there anyway to donate?

Edit:
Now when i think about it. It would be awesome to have tasker integration. Then you could for example send a specific text to trigger "record location". If the phone is lost or stolen.

Android 8 Oreo background problem

Hello,

I´m running µlogger on my Oneplus3 with Android 8. Since this update logging is not reliable working with µlogger.
If it is in front and the screen is on everything works fine, but if it goes in background logging stops.

Turning navigation on in google maps solves the problem at the moment. Logging works again.

Best regards, Stefan

smarter handling of change of server while a track is open for recording

when the server settings are changed to a new server while a track is being recorded,
ulogger will continue trying to log points into the opened track, which will likely either not exist on the new server, or be a different track there.

possible fixes:

  • do not allow changing the server settings while a track is being recorded
  • force (re?)starting a (new) track on any a server change
  • ask the user for confirmation ("it's the same server, just continue" or "(re-)start track"

(see also a related server-side flaw: bfabiszewski/ulogger-server#32 )

in my personal opinion,
requiring a track to be started by the client is sub-optimal anyway.
instead i would just have the server log to the last open track of that user (or not require separating the log into tracks at all).
(that would also allow for implementing #9 on the server-side, for example.)

MQTT support

Hi,
I hope this is the right place for this.

I have used OwnTracks in the past, but it requires Google Play Services, which I'm happy to have gotten rid of on my phone. Hence, I'm looking for a replacement.
Is there a way to make µlogger communicate with my MQTT broker?
(preferably without the server counterpart, but if inavoidable I'd jump through the hoops necessary to go via the µlogger server to MQTT)

Auto Pause

I'm thinking about using uLogger for tracking my bike rides. One vital feature I'd need for that would be auto-pause when stopping.

Are there any plans implementing that?

Comparison to GPSLogger?

Hi, have you ever compared your software to https://gpslogger.app/ ?

Is it possible to use the gpslogger to update your server?

I am asking because gpslogger has slightly better user interface, especially on modern android, it stays on very thin notification area and takes less screen than ulogger.

Change of Username doesn't update correctly in App

As the title says.
I have added multiple user accounts to a server for various reasons.
A bug that i've found is that when I change the username of an account, I must either restart the device or force close the app and reopen it for the username change to take effect.
There needs to be some sort of an Apply Changes Button maybe?

If this is not a bug, please do advise :)

System settings for location and uLogger config seems to be duplicate

Hi,

Thanks for this very useful app! I am using it to log to phonetrack-oc app on my Nextcloud! :) My goal is to have a basic app running in the background and logging 24/7 (with quite large interval, maybe an hour).

I discovered that in the app, there is a setting to choose location source (GPS, network or both). But this setting is also present in Android itself (I can choose between high precision, or battery saving which is basically the same setting).

I was expecting I could set the uLogger setting to "GPS and network" and it would default to whatever is available. This way, I could keep it running in background and switch location mode / disable location and uLogger would cope with it, trying to find the best source for each point and not logging if location is disabled (within a same track). But actually, it seems this is not the case and I have to match the system setting with the uLogger setting :/

Thanks!

Enable import gpx to web interface

Useful when ulogger website is stored on lan and is currently unavailable. It is already possible to export the gpx file but not to import it later on. It might be useful.

Crash on Android 9

I've tried to run uLogger on two mobiles with Android 9 (Moto X4, Nokia 7 plus), and application crashes, after click on "Start".
The same configuration works fine on Android 8 (Moto G6 play).
On Android 9, uLogger don't asks for permitions, but setting them manually doesn't help.

Records position only sporadically

Hi,
I've left mulogger run continuously since its release on FDroid, at the 1 minute or 10 seconds refresh intervals. Unfortunately, it records position values only for a fraction of the times it should, especially when the phone is not in use.

I've already ruled out filtering (minimum accuracy, minimum movment etc) -- because all measurements are much better than 5km in my area and I left the phone at home. Disabling automatic battery optimizations made things worse on the one night I tried.

I believe this is the same as the known, difficult problem caused by overzealous power management. Tiny Travel Tracker might give plenty of inspirations what solutions do not work. On the other hand, GPX recording by the Osmand plugin has never failed me, but it is also very heavy on the battery.

https://f-droid.org/repository/browse/?fdfilter=tiny+travel+tracker&fdid=com.rareventure.gps2

https://f-droid.org/repository/browse/?fdfilter=osmand&fdid=net.osmand.plus

Attached is the database dump of time stamps. Please let me know what you'd need from the logfiles -- I'd prefer not to publish everything from a very long time span (and audit it for sensitive information beforehand).

Thank you, it feels great to work with a responsive developer, even if I'm just a lowly bug-reporter.

ulogger.db.txt

Version info, everything from FDroid: ulogger 1.0 and 1.1 (upgraded as soon as published). MicroG 0.2.4 stable, backends LocalGsmNlpBackend + LocalWifiNlpBackend + OpenBmapNlpBackend current stable versions with current offline database.
Android 6.0.1 slimrom. Latest XPrivacy and XPosed, no restrictions on ulogger.

@ in username

Hi,

i think there is a bug, an @ in the username does not work, when i try to enter that, the application requests a "proper servername" , if i do anything else without @ i have no problem saving it

cheers
soeren

Bug: GPS keeps recording even after switched off

Hi, first thanks for making a network-location-only tracker. The GPS isn't reliably switched off.

Steps to reproduce:
Stop all other GPS apps. Configure network+GPS location. Start recording a new offline track. Configure network location only, but do not restart recording. Wait a bit. Check the recorded data with Oandbackup and Amaze.

Observed:
GPS datapoints keep getting recorded. The battery keeps getting drained.

Expected behavior:
GPS should not be active at all after configuring network location only.

Verison info, everything from FDroid: ulogger 1.0. MicroG 0.2.4 stable, backends LocalGsmNlpBackend + LocalWifiNlpBackend + OpenBmapNlpBackend current stable versions with offline database.
Android 6.0.1 slimrom.

Refactoring Log

This project is very nice, but have much duplicate code because no have one lib like Timber to manager logs

example:
this code

 if (Logger.DEBUG) { Log.d(TAG, "[onResume]"); }

will be:

Timber.d(TAG, "[onResume]");

App crashes on launching

Expected behaviour

The app is supposed to be stable and I should be able to use it properly.

Actual behaviour

But the app crashes on launching disabling users to use the any features.

How to reproduce

  1. Install the app from fdroid.
  2. Launch the app.
  3. The app crashes.
  • App version: 2.0
  • Device: Samsung Galaxy Tab 3
  • Operating system: Android 4.4.2
    (Ps: The app doesn't crash on Android 6.0.1 but crashes in kitkat os.)

Recording of the bug

https://youtu.be/LqEh8a0kxNI

[feature-request] Allow batch uploads instead of live sync

Currently, only live updates are supported, i.e. the location is uploaded as soon as it is acquired and logged.

A more battery-friendly behavior would be uploading locations in batches if live sync is not necessary.

A batch upload may have a few conditions:

  • minimal time between syncs
  • minimal number of updates in a sync
  • maximum time between syncs
  • maximal number of updates in a sync

and maybe a few others, I'm not sure what trigger logic would be best for an average user. For me it would probably be minimum time between syncs and minimal number of updates in a batch but ymmv.

bug: doesn't ask for location permissions

Steps to reproduce:
Install app. Configure network+GPS location sources. Start recording a new (offline) track.

Observed behavior:
The app never asks for location permission. In system settings -> apps -> permissions, ulogger doesn't have GPS permission.

Expected behavior:
A popup should ask for coarse + fine location permission.

Verison info, everything from FDroid: ulogger 1.0. MicroG 0.2.4 stable, backends LocalGsmNlpBackend + LocalWifiNlpBackend + OpenBmapNlpBackend current stable versions with offline database.

Android 6.0.1 slimrom.

Error when trying to upload to demo server

When I tap the upload button I get HTTP error code: 400 under the synchronization section. When I tap it again I get this:
Value <html><body><script of type java.lang.String cannot be converted to JSONObject

self-signed certificate error

I get the following error, and I'm fairly sure it's because I'm using a self-signed certificate. I would like the app to ask me if I want to accept it or not.

Thanks

java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.

Some Tutorial

Hai, I'm new on programming can you give some tutorial for connecting ulogger server to android ? I have save or install ulogger to my localhost and install ulogger on my android but it doesn't give me anything i'm trying to start and stop the application but still can't detect my location. Can you please help me?

Thanks for the app, issue: don't get location

First let me thank you for the app, and making it open source. I was on the way to create one for myself, I was a long user of TrackeMe (under windows mobile 6, then Android). For some reason, the app can't get any location, I have network cells and gps in the settings, and I have gps enabled. I'm on LOS 13.0 and I noticed that the app did not ask for location permissions, wondering what I'm missing. I don't allow google services to manage my location maybe the issue if you rely on them. Any way to have the application to get gps coordinates itself. Thank you.

Hide the notification icon

Hi,

Is it possible to hide the notification icon? i would like to use this app as a Find my device alternative, but the notification would be asking for the thief to disable the network connectivity (well, a smart thief would do that as soon as they grab the phone... but yea :D)

app doesn autostart on boot

ULogger should start tracking location on boot when this otion is selected in the settings, but it doesn't. I have to do it manually everytime my device reboots.

Device: Xiaomi MiA1
OS: Lineageos 15.1 (android 8.1.0)
App version: 2.2

Note: start at boot is allowed in privacy guard

cannot re-synchronize a track once it's been synchronized once

I would like to synchronize a saved track a second time, e.g. after removing and reinstalling ulogger-server. I could not find a way within the Android app to tell ulogger to synchronize a track a second time. It tells me the track has already been synchronized, which is not quite true since I blew away and reinstalled the server.

App uninstallable, version 1.0 present (but not visible)

I've tried to install you app in my wife phone, but F-droid report that version 1.0 is installed, claim there's an incompatible key and, even if i enable ''incompatible versions'' there's no way to uninstall it (and so upgrade it).

If i list installed Apps, there's no such app, even enabling ''system'' app view.

Clearly phone is NOT rooted. Some hint? Thanks.

cannot export huge gpx file

Ulogger cannot export a track as a gpx file once it reaches around a million data points. It simply hangs and gives no error message.

I use ulogger as an always-on, completely-offline GPS/NLP tracker for privacy reasons. There is no way to start a new track (since that would delete all previous data), so I'm stuck pushing everything into one single track. Over time, it has grown to over a million data points.

The workaround is to open an Oandbackup backup of the app database on the desktop with an sqlite editor.

Maybe some database code could be lifted from Tiny Travel Tracker? It is designed to handle that many data points.

wishlist: acquire position for free whenever another app already requested it

Hi,
would it be possible to make ulogger also read out the GPS / network position whenever another app has already requested the position (and incurred the battery drain)? This would further reduce power usage, because ulogger gets the position once for free and can wait longer until it requests the next location update from the OS.

Role models: This app acquires the GPS position and wifi scan results for free whenever another app initiates the scans:
https://f-droid.org/repository/browse/?fdfilter=backend&fdid=org.fitchfamily.android.wifi_backend

This app aquires the GPS position and displays a notification whenever another app scans for position: https://f-droid.org/repository/browse/?fdfilter=satstat&fdid=com.vonglasow.michael.satstat

Thanks for the great app!

Crash on autologging due to track name missing.

Hello.

ulogger keeps crashing on automatic logging on startup.

To reproduce:

Install ulogger.

Enter the following settings:

username filled in
password filled in
server url filled in
Live synchronization ticked
Auto start ticked
Other settings probably don't matter.

Android settings for app:
Battery optimisation: Not optimised
Grant location and storage permissions in Android settings.

Reboot device.

ulogger will start but will fail to log anything to server. Opening the app from the notification (if it stays open, it may disappear) will cause the app to close and will trigger a "ulogger keeps crashing" message from Android.

Workaround:
Press "NEW TRACK" button. Acknowledge warning about deleting data from ulogger (which may or may not show). Press submit to accept default name (in my case Auto_2018.12.09_22.05.12). Don't press "START"

Reboot device.

ulogger will now start logging and will not crash. Persistent notification is also shown and data is sent to the web server. However it will always log to the track name given in the workaround step (Auto_2018.12.09_22.05.12). New tracks are not created at each boot.

My feeling is that a new default track name should be created at each instance of automatic logging happening (emulating the user pressing the NEW TRACK button and pressing start), instead of the existing track being appended to.

The crash should obviously be addressed, but I feel a new track name should also be generated at each device boot.

exporting location data directly

Is there a way to export the location data to use with other applications?

Currently you have to go through the server app to then export the data. I understand they're meant to work together, but for someone who just cares about the data and the features of the android app, it would be more convenient to just get the data without going through the hassle of hosting the web app.

How this APP works

Just wondering, its some bug or my phone. Xperia Z5 no signal or bad signal from GPS sensor,
Open->setup settings->new track->start->and nothing
after all night got some signal on the way to work lost again, newer got back.
Any advice?

App crash

Hi,

I noticed that uLogger has a setting for a minimal distance between points to send an update of position. By lowering the default value (typically to "no minimum"), uLogger suddenly crashes with an Android popup about uLogger crashing and asking whether to open it again or not.

I might be able to pull a logcat log if it can help investigating the issue.

Thanks!

Android 8.1 & uLogger: background cellular data upload

I originally posted in this report as a comment. 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, both from this thread and latest from f-droid - battery optimisation off for the app - 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.FWIIW, GPSLogger does not display this behaviour.

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.