Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Android Auto connection or "OK Google" in OsmAnd #3391

Closed
stefanodroghetti opened this issue Jan 5, 2017 · 169 comments
Closed
Labels
Nice to Have Should be fixed but there is no priority or no possibility to fix it within current horizon planning
Milestone

Comments

@stefanodroghetti
Copy link

stefanodroghetti commented Jan 5, 2017

It would be very nice if Osmand could be used inside "Android Auto" application instead of Google Maps.
Or, at least, that "ok google" could be used during Osmand navigation, to call someone via bluetooth or anything else.

@vshcherb vshcherb added the Nice to Have Should be fixed but there is no priority or no possibility to fix it within current horizon planning label Jan 12, 2017
@ronnystandtke
Copy link

All future Opel Ampera-e drivers will love you for that feature! :-)

@vshcherb vshcherb added this to the 2.7 milestone May 10, 2017
@vshcherb
Copy link
Member

vshcherb commented Jul 4, 2017

Android auto is only compatible for messangers, navigation options are not available (only google maps)

@vshcherb vshcherb removed this from the 2.7 milestone Jul 4, 2017
@ronnystandtke
Copy link

Ouch. This sucks. Thanks for sharing the info. I will delete Android Auto compatibility from the must-have feature list for my next car. A good smartphone/tablet mount will be good enough to keep my freedom of choice of mapping applications, which means Osmand atm. Too bad...

@Jesse-Pelton
Copy link

This may be possible after all. There are reports that Android Auto 2.1 allows selection of the navigation app. Some supporting evidence: it would seem to be a prerequisite for the recent beta of Waze integration.

It wouldn't be surprising if there are roadblocks for other apps like OsmAnd, though.

@stefanodroghetti
Copy link
Author

[NEARLY SOLVED] :-)
Thanks to the new "Google" application, it's possible to allow "OK Google" on every screen and every app, OsmAnd included.
Unfortunatly, not all smartphones have this feature. For my Meizu m3 note I had to do a lot of work to enable this feature:

  • root it (very easy on this phone, just enable a Meizu account on "Accounts" settings) and restart
  • Install Terminal Emulator and grant root permissions
  • Download Xposed SDK and install it from Terminal Emulator. Restart.
  • Download and Install Xposed Installer
  • Surprise! No more root :-/ Install Kingroot and root it again. Restart.
  • Install "Google" app
  • Install "Link2SD" app
  • With Xposed Installer app, download and activate "Personal Assistant" Xposed module. Restart.
  • Make "Google" app a system app with Link2SD and restart.
  • Enable "OK Google from every screen" in Google app settings, and launch Assistant.

:-o So many things to do... But now it works. From OsmAnd I can say "Ok Google" and - only with my voice - I launch a vocal search, from which I can call a friend just saying "Call John Doe".
I guess on Nexus and other more Google compliant phones you just need to do the last task (enable "OK Google from all screens" in Google app voice OK Google settings.

@ilyaguy
Copy link

ilyaguy commented Jan 9, 2018

As I see, now it is possible to install Waze and use it instead of Google maps.

@rbovard
Copy link
Contributor

rbovard commented Jan 13, 2018

And what about OsmAnd?

@landswellsong
Copy link

Read a lengthy thread on the subject. Short recap of the drama:

  • AA allows to show any video stream on the car's HUD.
  • There was an SDK compiled by non-Google people to facilitate AA-aware apps development, notably obd2aa.
  • This was abused by some guy who made a Youtube player with it
  • Google obviously played safe to remove any potential responsibility and banned the app from Play
  • They additionally released AA-3.0 which only allows the whitelisted apps to use AA in real world cars (as opposed to emulation)
  • The devs of the existing apps currently either suggest to keep AA-2.9 and block updates or use some kind of adb hack (see obd2aa thread for details, but I'm not sure it's worth it) to unblock their apps

I wanted to contribute to OsmAnd and will be getting an AA-aware car soon. But I'm afraid this has to be brokered with Google afterwards so that they whitelist OsmAnd in their AA app so that the general populace can use it without hacking their phones.

@rbovard @vshcherb

@rbovard
Copy link
Contributor

rbovard commented Mar 1, 2018

Thanks for your detailed input @landswellsong

So the big questions is: How can OsmAnd be in this whitelist? Do you know if there is some guidelines about it?

@landswellsong
Copy link

landswellsong commented Mar 1, 2018

@rbovard I'm not a super expert on this topic unfortunately. I assume one has to apply, Google has this link and also this one in their AA documentation.

@Hedaja
Copy link

Hedaja commented May 17, 2018

Any news on that topic?
I quickly read through their guidelines and some might not be able to be reached without modifications.
for example they don't allow progress bars
Also OSMand doesn't really support voice input or am I wrong?
Being able to use OSMand on the in-car system would be great though

@thewafflehouse
Copy link

I'm hoping for this to exist, I'm about to replace my head unit and get rid of my offline navigation and when I head offgrid using OSMAND would be fantastic in Android Auto.

@landswellsong
Copy link

@Hedaja I didn't start yet, car still is being prepared :( maybe next month.

@greenbigfrog
Copy link

To get it in the play store, according to the documentation @landswellsong linked, it's just another check mark in the console, whcih then prompts Google to review the app.

@vshcherb
Copy link
Member

We still need to implement support for:

  1. Voice recognition to allow person to interact hands free
  2. Double check that app works according to guidelines.

@vshcherb vshcherb added this to the 3.1 milestone Jun 21, 2018
@LuisGC
Copy link

LuisGC commented Jun 21, 2018

Thanks for the update!

@tbertels
Copy link
Contributor

tbertels commented Jun 30, 2018

Based on https://developer.android.com/training/auto/start/

Auto currently supports two types of apps:
Audio apps that allow users to browse and play music and spoken audio content in the car.
Messaging apps that receive incoming notifications, read messages aloud via text-to-speech, and send replies via voice input in the car.

and on https://play.google.com/store/apps/details?id=com.sygic.incar&showAllReviews=true&hl=fr

Sygic maps navigation 18 juin 2018
hello. We are sorry, but connectivity features of Sygic Car Navigation are not supported in your Car. We do not support Android auto because Google do not allow 3rd party developers to create apps for these platforms.

it doesn't seem likely that Google will approve Osmand as an Android Auto app.
Which would explain why only Google Maps and Waze are compatible.

I wonder if it doesn't break the European Union competition law.

@vshcherb vshcherb modified the milestones: 3.1, Future milestone Jul 16, 2018
@mjuen
Copy link

mjuen commented Nov 15, 2018

What about MirrorLink?

This way it would be available in the meantime and in case Google ever opens up the AA SDK you would be able to use the existing interface (probably with a few tweaks).

@vshcherb
Copy link
Member

MirrorLink is supported via Car Mode of Samsung

@landswellsong
Copy link

I've played with the android auto support jar, sounds like I could do this on a hobby basis slowly, but from what it seems to be now (disclaimer: not an Android coder per se), the activities displayed on the car need to have separate activity classes deriving from a different hierarchy than the current phone ones. I.e. for code reuse most of the stuff needs to be converted to fragments and then pulled into 2 separate activities. Is that a feasible thing that can be done?

Other thing is that the jar is supposedly coming from a dubious source, I guess there is some diplomacy to be made with Google for them to provide the official one (after meeting the criteria)

@vshcherb
Copy link
Member

@landswellsong that's sounds like a big refactoring though if you could give a try to understand how big the scope is it and how big is the value, it definitely helps to plan that activity including understanding the limitation from Google itself

@landswellsong
Copy link

@vshcherb then does contacting Google about the political part (i.e. whether this will be approved at all eventually or Waze is a big special exception) sound like a good first step?

@tbertels
Copy link
Contributor

or Waze is a big special exception

I'm not sure we can call Waze an exception since it belongs to Google.

@landswellsong
Copy link

landswellsong commented Jun 28, 2019

I may have found an easier way that won't require refactoring, will report if I have any success with it. But the Google question still stands.

Also registered as a MirrorLink dev, seems much easier to do technically, but not many phones support it (great deal of politics involved) and not sure if the certification is mandatory.

@sonora
Copy link
Member

sonora commented Nov 24, 2021

Looks like that is the Android system notification, which on e.g. the smartphone would appear in the Android notification bar at the top of the screen.

It's appearance can likely be suppressed by disabling the respective notification under the Android system settings/Apps/OsmAnd. But I would say that's a workaround, I would think this is a bug for your particular setup and a true fix should be found.

@rcschreiner
Copy link

Hi Folks

How can I get the 4.1 release? (before google play)
My subscription is OsmAnd+
Tks.

@massivestars
Copy link

Blocking notifications did the trick. Thanks 👍

@schubi74
Copy link

Hello,
I am running Osmand+ on a Xiaomi Redmi Note 9 and as car I am using a Renault Twingo Electric. I can link the phone to the screen via Android Auto as well as zoom in and out with the + and - buttons. But when I push the "favorites"-butten, osmand gets stuck. After some time I can choose to stop the app or to wait. Nothing helps.
If I select the favorites on the phone, there is no problem. I can also start the navigation mode via the phone and the routing works flawlessly on the car screen.
Any idea what might cause the problem with the favorites menu? Maybe access rights to the favorites.gpx-file?
Apart from this problem I must say great work for a first version featuring Android Auto!
Regards
Andreas Schubart

@lgwapnitsky
Copy link

I'm guessing the version of osmand+ on fdroid doesn't have the AA capability yet?

@michaelblyons
Copy link

I'm guessing the version of osmand+ on fdroid doesn't have the AA capability yet?

The "suggested" version doesn't, but if you open up OsmAnd~ in F-Droid and tap "Versions" down at the bottom, you can upgrade early to the 4.1.x versions.

@lgwapnitsky
Copy link

lgwapnitsky commented Jan 4, 2022 via email

@lgwapnitsky
Copy link

lgwapnitsky commented Jan 4, 2022 via email

@sunng87
Copy link

sunng87 commented Jan 7, 2022

I'm on OsmAnd~ 4.1.11 too and it doesn't show up in Android Auto.

@hmrodrigues
Copy link

Same thing over here, just updated from F-Droid but it doesn't show on AA, at least on the Customize Launcher menu

@IrgendeinDulli
Copy link

I'm using OsmAnd~ 4.1.11 and an AA Simulator on my PC (DHU), and it's working.

@x86dev
Copy link

x86dev commented Jan 8, 2022

+1 here -- OSM~ 4.1.11 is not show in AA here... tested on a Citroen from 2019 with a Bosch RCC head unit.

@daniu-de
Copy link

daniu-de commented Jan 8, 2022

I found the reason OSMand+ is not showing in my AA:
I did not have a paid version of osmand+ but the free version from fdroid. I bought the paid version in the christmas sale from playstore and did get the real beta (4.1.11) and do see osmand+ in AA

Do buy the paid version - won't promise it will work then but I can imagine it will and it is also a good idea to support osmand

@x86dev
Copy link

x86dev commented Jan 8, 2022

It would be nice if any of the officials could clear this up or state whether Android Auto should be working with the OSM~ version from Fdroid or not. I do not use the Play Store however.

@vshcherb
Copy link
Member

OsmAnd uses Google Play Services to connect to Android Auto, so it doesn't support yet https://source.android.com/devices/automotive

@Elaborendum
Copy link

@vshcherb So the F-Droid version could connect to AA in a future version? Is there any issue we could follow for now?

@beholders-eye
Copy link

I also have OSM~ version installed using F-Droid and at the same time, Google Play Services is also installed and working, the official one from Google. So why won't OSM~ work with Android Auto? Is it built without that feature?

@vshcherb
Copy link
Member

As I understand:
https://github.com/osmandapp/OsmAnd/blob/master/OsmAnd/build-common.gradle#L396

	implementation "androidx.car.app:app:1.1.0"
	implementation "androidx.car.app:app-projected:1.1.0"

and here

	<service
			android:name="net.osmand.plus.auto.NavigationCarAppService"
			android:exported="true">

			<intent-filter>
				<action android:name="androidx.car.app.CarAppService" />
				<category android:name="androidx.car.app.category.NAVIGATION"/>
			</intent-filter>
		</service>

I don't know why F-droid build doesn't have Android Auto connection to be honest.

@beholders-eye
Copy link

beholders-eye commented Mar 25, 2022

I don't know why F-droid build doesn't have Android Auto connection to be honest.

This is why: https://gitlab.com/fdroid/fdroiddata/-/blob/master/metadata/net.osmand.plus.yml#L4520.

The build job definition on F-Droid CI/Build Server does not fetch Google Play Services, so the patch the build script to remove support, by doing that, we won't get Android Auto support.

This isn't the reason.

@beholders-eye
Copy link

The package maintainer explains why he decided to do that too:
https://gitlab.com/fdroid/fdroiddata/-/blob/master/metadata/net.osmand.plus.yml#L4641-4642

Also in the prebuild, delete com.google.android.play dependency and replace RateUsHelper (which used it) with a stub.

Not directly related to AA, but the consequence is that F-Droid's build won't have that feature.

Maybe build it ourselves? https://docs.osmand.net/en/main@latest/development/build-osmand/how-to-compile-the-android-version

@ArchangeGabriel
Copy link

AndroidAuto is not removed on purpose, only PlayServices. That should not be related, as e.g. VLC seems to work fine with AndroidAuto. The F-Droid ticket is there. You can follow the conversation, but please don’t post just to say it does not work, everyone knows. But if you have actual insights about why it does not work, feel free to share. :)

@vshcherb
Copy link
Member

Well we have issues with Amazon build as well but there it should not be a problem of Google Play Services anyway we will continue investigation and we don't know yet why it doesn't function. Probably we will need to setup our somehow

@beholders-eye
Copy link

After looking closer into this, found out that Google Play Services isn't related to it. At least there's no signs of that in the source code.

@argrento
Copy link

argrento commented Apr 6, 2022

Not related to the OsmAnd. I have removed Google account from my phone and install a set of apps with Android Auto support via AuroraStore: OsmAnd, 2GIS, etc. None of them was available for navigation on my car head unit. So I removed them, log in back to my Google account and download the same apps via Play Store: and surprisingly they were available on the head unit.

@polarbearing
Copy link

Just to sync the discussions, the workaround at least for some Android versions is here: 13514#issuecomment-1086203926

@starbrights
Copy link

For me (Android 12) the workaround doesn't help. But OSMAnd (same as "here" and "VLC") is listed in AA app if you tap on version. But only VLC (from FDroid) is selectable via Launcher and works.

@maxolasersquad
Copy link

Throwing this out there as a personal opinion. This issue was to implement Android Auto support, which has been completed. Any issues found while using the Android Auto feature should be new issues so that people experiencing the same issue can follow the specific issue and get updates just for that, and not be spammed every time someone has something to say about Android Auto integration in general.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Nice to Have Should be fixed but there is no priority or no possibility to fix it within current horizon planning
Projects
None yet
Development

No branches or pull requests