Android 11

Mike3 years ago

Is there any hope of getting the client to work again in Android 11?

This software is too good to let die because google saw fit to make permissions changes. It's funny how their apps (play services among others) always get full background access to everything, and you can't disable it... Also funny that more and more functions require location to be enabled... but that's another story.

It looks like it should be doable, at least by pointing the user to the proper permissions page and having the user make the change, ie:

https://developer.android.com/about/versions/11/privacy/location
https://developer.android.com/about/versions/11/privacy/permissions
https://stackoverflow.com/questions/64246883/android-11-users-can-t-grant-background-location-permission
https://developer.android.com/training/location/permissions

As far as the justification, it's obvious that background location is critical to the basic functionality of the app.

Any workarounds, like sideloading the app from Github or wherever, avoiding the play store?

Anton Tananaev3 years ago

Work again? It works just fine. We don't use background location.

Mike3 years ago

In my testing, since upgrading to Android 11, the client doesn't appear to update location unless it's running in the foreground. This is with all battery and data optimizations disabled.

Am I missing something? I thought this was a widespread problem, based on forum posts and recent play store reviews.

How can the client work without background location?

Anton Tananaev3 years ago

We use foreground service. Recent reviews are probably related to a known issue that has since been fixed.

Mike3 years ago

How should I proceed in troubleshooting the problems that have cropped up since the Android 11 upgrade?

And so I'm clear, you're saying Traccar client should work with the client not running in the foreground on Android 11 out of the box (with only battery optimization and data restrictions disabled) - correct?

Anton Tananaev3 years ago

You can try getting android logs to see what happens. But yes, it should work just fine on Android 11. Working on my device.

alexsahka3 years ago

Android 11 Galaxy S20 has the same problem unless I open the app manually pressing on the icon after this Traccar will report locations for about 6 -8 hours.
Even tried to use Tasker to open traccar app every 4-5 hours but it is not working for some reason.
I tried everything. Worked great before (On Note10+, S8 pre-Android 11 phones)
Here is more info on this issue:
https://issuetracker.google.com/issues/179644471?pli=1
https://issuetracker.google.com/issues/122098785
https://github.com/urbandroid-team/dont-kill-my-app/issues/307#issuecomment-827649020
https://dontkillmyapp.com/samsung

alexsahka3 years ago

Антон никаких мыслей как обойти проблему на Samsung с Android 11 ?
Вся семья перешла на новые телефоны и Траккар клиент работает несколько часов а потом останавливается.
Одно заметил по сравнению с другими программами У траккара клиента нет даже возможности внести его в Background usage limit - Never sleeping apps. Я могу добавить в ручную почти все другие apps (даже траккар менежер) но не траккар клиент.

Спасибо за хорошую программу!

Anton Tananaev3 years ago

Пока мыслей нету. Не совсем понимаю почему не добавить в never sleeping apps.

alexsahka3 years ago

Я не могу добавить туда, она в с списке never sleeping apps не появляется когда пытаешься в ручную добавить.

Anton Tananaev3 years ago

Собственно я и не понимаю почему приложения в списке нету.

alexsahka3 years ago

У меня как то было что-то подобное с Traccar где-то год назад, тогда я нашел старше версию не помню где и она стала появляться в листе never sleeping apps. А с Play store не добавлялась нужно попробовать.

alexsahka3 years ago

Интересен факт что я не добавлял в ручную Gotify app a он там уже сам был.

https://github.com/gotify/android

alexsahka3 years ago

Пробую Autostart and StaY! https://play.google.com/store/apps/details?id=com.atasoglou.autostartandstay

24 часа и Traccar все еще работает, посмотрим как будет через несколько дней.

  • Autostart using BroadcastReceiver Intent also supported!
  • Make an app always stay in the foreground (persistent mode)
alexsahka3 years ago

48 часов Traccar все еще работает с Autostart and StaY! https://play.google.com/store/apps/details?id=com.atasoglou.autostartandstay
я думаю что все будет нормально.

Антон, нельзя ли добавить код (Make an app always stay in the foreground (persistent mode))
и сделать App для Тупых Samsung телефонов с Android11?
Готов быть тестером.