traccar-client-android icon indicating copy to clipboard operation
traccar-client-android copied to clipboard

Android Client not sending updates

Open vsatmydynipnet opened this issue 6 years ago • 47 comments

Hi!

Thank you for this cool software. I setup an Server running on FreeBSD which worked fine in shortest time.

The IOS Client sends updates and is shown as expected.

The Android client, installed a) from F-Droid and b) via Yalp Store from Google Play does not sent updates.

  • Config: -- Samsung SM-T585 Tablet (No SIM Card, Wifi only connected) -- Installed LineageOS 14.1 without GApps, so no Google Play Service is installed -- Changed Url, rest default and enabled service: says Network is online. -- Added Batterie exception on Android -- Opened AFWAll+ Firewall for Traccar client

Server and also server log, does not show anything from this device. Everything else on this tablet is working fine and when i do a telnet IP 5055 to my server via termUX, i do see the connection in the server log. So port is open and connectivity should be ok from this device.

Actually i run out of ideas and any hint would be appreziated.

Many thanks!

vsatmydynipnet avatar Sep 15 '18 11:09 vsatmydynipnet

Have you read Traccar Client troubleshooting guide?

tananaev avatar Sep 15 '18 11:09 tananaev

Yes, and as mentioned, telnet from this device to the server works and is visible. As mentioned in Point 4 of the troubleshooting guide:

  • Internet access works, device has an exeption to go out without proxy. Testet with browser
  • Permissions are ok, all set when showing all permissions for the client
  • Location services is on and shows last request from Traccar Client
  • There was a "modus setting" - sorry mine is in German. below the Location services setting. Location services was on, modus is now on power savings mode - says WLAN, Buetooth or Mobile Nets für Locating finding. excludes GPS.
  • It says Location services ON/Energy Saving Mode

I am usure what you mean with network location provider is enabled?

vsatmydynipnet avatar Sep 15 '18 11:09 vsatmydynipnet

So, what do you see on the status screen? That's the first thing you need to check.

tananaev avatar Sep 15 '18 11:09 tananaev

  • service startet
  • network online Missing;: Location update

vsatmydynipnet avatar Sep 15 '18 11:09 vsatmydynipnet

It means that your device doesn't report location. Carefully follow all troubleshooting instructions.

tananaev avatar Sep 15 '18 11:09 tananaev

Installed LineageOS 14.1 without GApps, so NO Google Play Service is installed

Without Gapps should work ok?

vsatmydynipnet avatar Sep 15 '18 11:09 vsatmydynipnet

Yes, it should work just fine without Google Apps.

tananaev avatar Sep 15 '18 11:09 tananaev

Ok, will recheck everything and report back. Thank you!

vsatmydynipnet avatar Sep 15 '18 11:09 vsatmydynipnet

Rechecked everything, incl. deactivation of firewall, aso. Location Service is running, all permissions set com.location.android.fused running

I am out of ideas.

vsatmydynipnet avatar Sep 15 '18 13:09 vsatmydynipnet

I changed from energy saving mode to high accuracy on android system settings & traccar client, used gps status to check gps is working and it reports immediately. it does not report with low and medium on traccar side, even gps is on. ButI assume GPS/ high is a battery drainer.

vsatmydynipnet avatar Sep 15 '18 15:09 vsatmydynipnet

Low and medium use network location provider. Is it enabled? Are permissions enabled? Do you have network connection? Have you test any other app to see if you can get location using network provider?

tananaev avatar Sep 15 '18 21:09 tananaev

Sir, please read my posts to see I have checked everything. am not an android Specialist, but I wrote I tested with Browser and Telnet from the device. Furthermore I wrote:

Rechecked everything, incl. deactivation of firewall, aso. Location Service is running, all permissions set com.location.android.fused running

Actually I found gpsstatus to check GPS is running. I have not found an App to check Low/Medium use. Any suggestions?

vsatmydynipnet avatar Sep 16 '18 06:09 vsatmydynipnet

What do you mean by "Location Service is running"? What location option is configured in the Android system itself?

You can check by using Google Maps on any other app. Just disable GPS and leave network location ON.

tananaev avatar Sep 16 '18 07:09 tananaev

All written above.
Android Location service is on, 3 Modes in Location settings GPS, WLAN..., GPS WLAN.... Testet all 3, Te WLAN/Network one is not working. As long as GPS is included, it works IF set to HIGH on Traccar client.

I don't install Google Maps App, but will check if there is something else.

vsatmydynipnet avatar Sep 16 '18 07:09 vsatmydynipnet

Sounds like network provider just doesn't work on your phone. It depends on Google service, so maybe you got it blocked somehow.

tananaev avatar Sep 16 '18 11:09 tananaev

Hi @vsatmydynipnet , I will try to lend a hand:

  • I heavily use SatStat (not only for debugging, but also because it's an excellent software, and the UI is just pretty).
  • You might want to give a try to https://github.com/traccar/traccar-client-android/compare/master...oliv3:locationProvider. This branch adds analytics that may help you finding out what's wrong.
  • I can provide you with a .apk if you can't build one, please feel free to contact me either privately or better, on IRC (https://github.com/traccar/traccar/issues/3475).

oliv3 avatar Sep 16 '18 11:09 oliv3

here it works using GPS+Network+Bluetooth+Cellular or GPS device only on Android and High on Traccar. The Energy saving WLAN... mode doesn't work. Access to Google is not blocked here, but as mentioned above, no Google apps or services installed on the device. Naked LineageOS only.

And also written above I connected it via my mobile phone too, so mobile is connected via LTE, creating an hotspot for the device. This way all things are open.

Took my IPhone with me for bicycle tour. Reporting on IOS is correct, medium reports every 5 minutes, so tour is recorded fine. Traccar uses far more battery on IOS then Owntracks. This is kinda problem.

vsatmydynipnet avatar Sep 16 '18 13:09 vsatmydynipnet

I can confirm that with GPS+Network+Cellular+Bluetooth, it only works with the "high" setting.

oliv3 avatar Sep 16 '18 13:09 oliv3

(Unfortunately I don't use Apple products).

oliv3 avatar Sep 16 '18 13:09 oliv3

I am mid in moving away all devices and with LineageOS a secure and bloatware free device, respecting the privacy is possible. My last problem was replacing owntracks with something working without installed Gapps on it. I think we close this for now.

I will buy an additional phone, which is fully supported by LineageOS and retry it with this one. The actual one is some tablet without SIM card. Will report again, after install and test is done.

Thank you very much and enjoy the sunday!

vsatmydynipnet avatar Sep 16 '18 13:09 vsatmydynipnet

Have you looked at https://e.foundation/ ?

oliv3 avatar Sep 16 '18 13:09 oliv3

Looks like they try to start something as Puri.sm with their Librem5. Hopefully alot of these types comes up. Reads promising

vsatmydynipnet avatar Sep 16 '18 13:09 vsatmydynipnet

Guys - please move this discussion to the forums.

garyvdm avatar Sep 16 '18 14:09 garyvdm

Not sure if the forums are the best place for that.

oliv3 avatar Sep 16 '18 14:09 oliv3

@tananaev OK, experiments here confirm that IF GPS is turned on the phone, and Traccar uses the "High" accuracy setting, location updates occur. When using "Medium" or "Low" setting, Traccar will not send locations UNLESS another application uses GPS. I expect this to be worse when relying only on Network. This with a Sony BTW. So I don't really expect some kind of weird manufacturer tuning. Can anyone confirm ?

oliv3 avatar Sep 16 '18 18:09 oliv3

And (absolutely not tested, though) I would also suspect the Hidden application flavor to be really stealth in that case.

oliv3 avatar Sep 16 '18 18:09 oliv3

Morning! @oliv3 This is same here on Samsung SM-T585(Galaxy Tab A (2016)) Tablet. I have not installed the Hidden App, socan't confirm for this one.

vsatmydynipnet avatar Sep 17 '18 06:09 vsatmydynipnet

I agree with above comments, as if my below experience is helpful for anybody.

I'm using Traccar client on Android 6, GPS on high accuracy, app allowed in firewall and phone left in high speed 4G connection in open sky area, works for a while, then suddenly stops sending updates. I observed initially the app's icon is displayed at the top status bar, but when it disappears suddenly, it is declared as offline in Traccar web. Another observation: When I explicitly open the client app again, it starts transmitting, so the app quits or is killed by the Android OS. I also checked, my phone doesn't have memory management and is not set to kill apps automatically.

greatidea1 avatar Oct 15 '18 02:10 greatidea1

Are you sure your phone doesn't have battery optimisation (e.g. Doze mode)?

tananaev avatar Oct 15 '18 03:10 tananaev

@tananaev Client still doesn't send anything unless accuracy setting is set to "High" and GPS is activated on the phone, or accuracy setting is "Medium" or "Low" and another application is requesting GPS-based location updates. Cellular/Wi-Fi network is basically not used, even with "High" setting. Any hint appreciated, thanks !

oliv3 avatar Oct 17 '18 13:10 oliv3