osmandapp / OsmAnd

OsmAnd
https://osmand.net
Other
4.64k stars 1.01k forks source link

Android Auto keeps asking for location permission; unlocking phone required #15965

Closed mitohund closed 1 year ago

mitohund commented 1 year ago

Description

When Android Auto launches in the car, OsmAnd asks for location permission (see photo below). Tapping on "Grant Access" does not do anything. Simply unlocking the phone (without granting any permissions) makes the message go away.

(EDIT: Behaviour is actually slightly different, which I only noticed later. If I tap "Grant access", nothing happens - but unlocking the phone AFTERWARDS immediately switches to the OsmAnd app on the phone and the permission is granted. If I do not first tap "Grant access" on the car screen, unlocking my phone does not achieve anything. So I need to do both: tap the car screen AND unlock the phone.)

This is a bit inconvenient, since the phone is oftentimes in a pocket or bag and needs to be found and unlocked to be able to use OsmAnd.

android_auto_permission

How to reproduce?

  1. start car
  2. Android Auto launches automatically
  3. OsmAnd asks for permission

Your Environment

OsmAnd Version: 4.3.2 Android/iOS version: Android 11 / Oxygen OS 11.0.9.1GM57BA Device model: OnePlus 7

Maps used (online or offline):
offline

vshcherb commented 1 year ago

If you grant permission inside Android before you connect to Android Auto, does it popup?

mdykierek commented 1 year ago

I have Allow when in use and I get the request all the time. I need to check if unlocking the phone helps, because I doubt it. Checked. Unlocking phone does not help at all.

vshcherb commented 1 year ago

You can only grant permission if you car doesn't move (engine isn't started ?), we're not sure if you can do it if you phone is not connected yet to Android Auto.

mdykierek commented 1 year ago

When engine is working, it reads what I wrote in the discussion - "Not available while driving". Check-mate. It is really hard to get OsmAnd to with AA now (it wasn't easy in the past too: #13732). When you grant before starting engine, then you need to eventually start it - Android Auto gets disconnected and the Grant permission comes back when the Toyota touch boots. Please note that Sygic and Fuelio don't ask for this permission on AA.

Zirochkabila commented 1 year ago

OsmAnd~ 4.4.0#14023mqta, released: 2022-12-14

Grand access button doesn't work only if OsmAnd doesn't provide access to the location.

After access to the location is provided (Precise - While using the app) and the GPS function is activated - we get the result that in the video - Grand access button works and you can use OsmAnd (provided that OsmAnd was opened) *Tested using USB connection and selecting File transfer/Android Auto

https://user-images.githubusercontent.com/104760013/207612052-7ef20730-e070-4ee6-bfb2-4f4bf36b4516.mov

mdykierek commented 1 year ago

I strongly disagree. I have GPS on, Location access when app in use and when engine is off, then the button works OK and OsmAnd appears on car's screen. When engine is on, then Grant access refuses to function "Not available while driving". When starting the engine, Toyota touch seems to do something similar to reboot and most of the time, Android Auto gets disconnected. It takes a lot of luck to enable it before starting engine (yeah everyone remembers to plug the phone) and avoid disconnecting by ignition.

oxygen155 commented 1 year ago

I can confirm - same thing happens to me too. I have the latest OsmAnd release from beta channel (4.3.3).

It asks for permissions in both Toyota Touch (MM19) and GM/Opel Intellilink (HMI 2.5 on latest SW).

OsmAnd have the same permissions as GMaps and Waze. I have even made a global reset of permissions, reset AA, reset GPlay Services, reinstall OsmAnd - same results.

Phone is Xiaomi on Android 12, MIUI 13 AA is 8.5.624594.

Unlocking the phone and launching OsmAnd manually on the phone removed the "Grant Access" message.

cyankahly commented 1 year ago

I have the Same Problem with AA in my Kia.

Every time i start OsmAnd since Version 4.3 i have to give the permission.

Under Version 4.2 all okay

ChrisSX976 commented 1 year ago

Referring to the information from oxygen155 : I also have this problem, I also have a Xiaomi on Android 12 and I also have Opel Intellilink.

lours1 commented 1 year ago

Hello, I also get this problem on my two cars https://www.youtube.com/watch?v=nWGdkPshnIQ

Device: One plus nord 2 - Android 12 Android auto version: 8.6.12500 Osmand+: 4.3.3

Android auto device 1: Skoka kodiaq 2022 Android auto device 2: Pionner

limerickguy commented 1 year ago

Having same issue.asking for access. Have all premissions enabled on phone but still get message grant access. I ly happening since I installed on new android phone few months ago. Have paid version of osmand maps plus and can't use because of this problem.

Is there a update too correct this issue from osmand ?

mdykierek commented 1 year ago

I believe that you can figure out similar procedure I did for my Toyota Touch 2, but definitely this nagging dialog makes life harder.

  1. Start engine,
  2. Make sure parking brake is engaged,
  3. Open OsmAnd on your phone screen,
  4. Grant access on car's display Do it every time Android Auto gets disconnected ;)
limerickguy commented 1 year ago

I believe that you can figure out similar procedure I did for my Toyota Touch 2, but definitely this nagging dialog makes life harder.

  1. Start engine,
  2. Make sure parking brake is engaged,
  3. Open OsmAnd on your phone screen,
  4. Grant access on car's display Do it every time Android Auto gets disconnected ;)

Tried that yesterday and didn't work. I try with engine off and see if it makes any difference. Shouldn't have to do it. Don't have this issue with other apps only osmand app with android auto.

lours1 commented 1 year ago

I don't understand why we can't get the same option of localisation as google map and waze, and get the hability to give always give access instead only when application is running for my one plus nord 2 if i don't give this permision, i can't get localisation on android auto with google map and waze

mdykierek commented 1 year ago

I think the reason behind Waze and Google Maps being privileged in this matter is... they're Google's. I don't see any other app having this option available.

limerickguy commented 1 year ago

I think the reason behind Waze and Google Maps being privileged in this matter is... they're Google's. I don't see any other app having this option available.

I have Tom Tom and amigo and don't have issues.only with osmand. Unless fix this then people have no choice but to use other navigation apps with android auto.

ChrisSX976 commented 1 year ago

I bought a Cubot J10 to use just for navigation. Only €60 new, probably because it is only 3G which is being turned off in Germany. It was my idea to use it with OSMand+ as that should independent of 3G, 4G etc. It will probably not work on AA, haven't tried it yet. But I expect that. If it doesn't work on OSMand+ I have an expensive doorstop or paperweight!

mdykierek commented 1 year ago

If you get past the Grant access, OsmAnd+ works with AA.

ChrisSX976 commented 1 year ago

The prodeedure from mdykiereck works on my Xiaomi + Opel Intellilink. On Step 3 I have to access the OSMand app on the car screen by going via the AA app. Must check out my Cubot next.

limerickguy commented 1 year ago

Tried this on way home from work. Opened the osmand maps plus on phone ,with engine off but first turn off key without turning on engine plugged into intellilink in vauxhall with usb c cable into phone , looked to grant access and it accepted,so worked. Notice not as smooth movement with direction arrow,maybe need too turn off some plugins .but worked. Very much around about way to get it to work. Hopefully osmand will fix this with future updates.

ChrisSX976 commented 1 year ago

Thanks to the support here I now have OSMand+ working reliably on the car screen. However it seems to be a completely different animal than the version on my smartphone. I cannot get it to remain in day mode, and it starts off showing distances in miles and then changes to metres. I assume that the settings come from the phone, but the screen seems to be completely ignoring these. And as mentioned above, the movement of the arrow is not smooth. More fiddling I guess. 😕

juanantoniomosquera commented 1 year ago

Same problem, every day I have to enter the osmand app to grant permissions

mitohund commented 1 year ago

With app version 4.3.3 the situation is slightly better. I can grant location permission on the car screen and do not need to unlock my phone. However, it still asks every time Android Auto is launched. Also, it does not accept input while driving - which is also quite inconvenient (or even impossible in some cases, when you're on a highway and can't stop, for instance).

mitohund commented 1 year ago

OsmAnd~ 4.4.0#14023mqta, released: 2022-12-14

Grand access button doesn't work only if OsmAnd doesn't provide access to the location.

After access to the location is provided (Precise - While using the app) and the GPS function is activated - we get the result that in the video - Grand access button works and you can use OsmAnd (provided that OsmAnd was opened) *Tested using USB connection and selecting File transfer/Android Auto AA.mov

I think this varies depending on the app version. You are using 4.4.0 (beta?). I was on 4.3.2. Now, with 4.3.3, I get a similar behaviour to you (as described above). It's still inconvenient and sometimes prohibitive, as also described above.

mdykierek commented 1 year ago

With GPS off and OsmAnd open on the phone I can grant access on car's display as long as parking brake is engaged. So the request is not as exact about location as one would expect.

HellsBells24 commented 1 year ago

I am so glad I'm no the only one experiencing this issue- I can only display the app on Android Auto if I grant access to the app while the car is in park. As stated above, if the phone is disconnected in anyway, I have to repeat the process. I also noticed this morning that if I tap the car's infotainment screen, the map disappears and I am informed that I must enable permissions for navigation as well - which again, can't be done until I put the car in park, which is often less feasible than granting permissions when initially starting the car.

limerickguy commented 1 year ago

To be honest. I'm starting to use Waze now as getting. Tired of every time I have to open app in phone to give access to osmand maps. Osmand need to fix this. Never had this issue with any other navigation app when using android auto only osmand . Pity but there you go. I wouldn't recommend osmand to anyone with this issue.

HellsBells24 commented 1 year ago

I certainly hope they do. I like Osmand and FOSS in general, but there was a reason I started with a year license instead of lifetime.

Sent from Proton Mail mobile

mdykierek commented 1 year ago

Let's give them some time. OsmAnd is not only Android Auto and car navigation. I think there are too many of us finding this annoying to let them ignore this issue. I personally got back to OpenStreetMap editing because of OsmAnd (not to get the updates, but to have the best maps we can get).

limerickguy commented 1 year ago

Let's give them some time. OsmAnd is not only Android Auto and car navigation. I think there are too many of us finding this annoying to let them ignore this issue. I personally got back to OpenStreetMap editing because of OsmAnd (not to get the updates, but to have the best maps we can get).

When I first got paid version in 2021 didn't have this issue. Only difference is my phone now uses android 12 . I have uninstalled and reinstalled 4 times. Gave full premissions for everything and still I have to go through weird process to get it to work in android auto. If I can use on android auto then no use to me. I use another navigation app for now but will check in too see if fixed.it be good navigation app with great details and options but not the way it is currently.

ChrisSX976 commented 1 year ago

Try what I may, my Huawei P10 will not connect to Android Auto and as a consquence not to OSMand+. It seems that Google had an issue with Huawei and blocked access to Android Auto. Secondly my purchase of a Cubot J10 was a waste of money as no way will it run Android Auto or OSMand+.

juanantoniomosquera commented 1 year ago

Please try to fix this bug as soon as possible. I have the paid version to use Osmand in Android Auto. The latest Android Auto update may be causing the problem. Permissions can only be granted when the car is stopped, if you are running or the app crashes (sometimes osmand crashes and closes in android auto) you cannot re-enable navigation without stopping the car.

mdykierek commented 1 year ago

Did anyone try to downgrade Android Auto or OsmAnd to see if the issue came with AA or OsmAnd?

ChrisSX976 commented 1 year ago

I tried to download AA 5.3 but wherever I tried I didn't get anything I could use. To be honest I'm not too good at that kind of stuff. AA 5.3 is supposed to be the cure all for these problems.

DIRMAINT commented 1 year ago

Same issue on Toyota Proace City Verso and Nokia 7.2. The indicent started after the update last week. In addition the OsmAnd running on Samsung Tab S6 Lite crashes regularly after one or two hours of driving, and restarting the app is terribly slow, takes two or three minutes. Earlier, the startup was a matter of seconds. Thus, the latest update made the app barely usable.

mdykierek commented 1 year ago

Hurray! Any ETA?

lours1 commented 1 year ago

@Chumva has made a fix for this problem. (Thx to him :) ) Now we have to wait a new version

ChrisSX976 commented 1 year ago

Re my comments regarding the screen ignoring my inputs on my smartphone : Sorry, it was due to some basic errors on my part. All fixed now! But I wish that the route guidance box was smaller. It blocks out too much of the map.

steffenw commented 1 year ago

IMG20221217102304 IMG20221217102329

steffenw commented 1 year ago

Hello,

I had a very interesting behaviour related to Android Auto. First, the map only moves when the app is in the foreground on the phone.

Then the display in the car restarted while driving. The map never came back. This is well-intentioned with the distraction from driving but this rather put driving in the background because I struggled with the navi for a very long time and finally lost.

Greetings from Steffen Winkler

Zirochkabila commented 1 year ago

@mdykierek In the next nightly version, there should be fixes - please check it.

mdykierek commented 1 year ago

What kind of trouble I may expect with nightly and afterwards, when I want to get back to OsmAnd+ production version?

sonora commented 1 year ago

Unless I am mistaken, the fix was merged to 4.3.4 production yesterday... (BTW: Well spotted, @Chumva I had looked at the same code but totally overlooked it!)

mdykierek commented 1 year ago

I am proud to announce - OsmAnd+ 4.3.4 no longer asks for location access on Android Auto on my Toyota Touch 2.

ChrisSX976 commented 1 year ago

It all seems to work very nicely now. And the arrow movement is definitely smoother. Thank you! Just one comment, Android Auto does not allow access to a Huawei phone. As you have to log on to OSMand via Android Auto, it means that having the OSMand map on the car screen is also not possible with a Huawei phone. Apologies if this is considered off topic.

mdykierek commented 1 year ago

Well, Huawei phone is a risky choice since 2019. IMHO the Android Auto problem you have is a part of broader Chinese manufacturers ban - https://www.androidauthority.com/huawei-google-android-ban-988382/. This is an ongoing issue including more and more companies (ZTE, Hikvision, Dahua, Hytera). Xiaomi was close too.

ChrisSX976 commented 1 year ago

Thank you for the information! Maybe replacing my Huawei with a Xiaomi was not the brightest of ideas 😂😂😂

mdykierek commented 1 year ago

https://news.softpedia.com/news/xiaomi-avoids-u-s-ban-at-the-very-last-minute-532429.shtml

ChrisSX976 commented 1 year ago

Sorry to be off topic again, but I am very grateful for the infirmation above. Just one last question, is Motorola defined as American or Chinese?

mdykierek commented 1 year ago

Both Motorola Solutions and Motorola Mobility (phones) seem to be considered American. You are however right - being a subsidiary of Chinese Lenovo doesn't make things that clear. IMHO Motorola is safe, Xiaomi more or less safe (for a "normal" phone life span) - don't make me liable for these words.