34
submitted 1 year ago by heyfrancis@lemmy.ml to c/foss@beehaw.org

Android auto for OsmAnd is a paid feature either through subscription or one-time purchase. Has anyone tried it and do you think its worth it?

you are viewing a single comment's thread
view the rest of the comments
[-] noddy@beehaw.org 13 points 1 year ago

Have you tried the "OsmAnd~" version on fdroid? I think that one is basically the full version without a paywall. You could try yourself if you find it worth it, and buy the official app if you want to support the project.

[-] heyfrancis@lemmy.ml 2 points 1 year ago

Yeah that's what im using from fdroid but Android auto is not available unless i subscribed or pay for the app. Wondering hows the app for people who already used it.

[-] alphafalcon@feddit.de 5 points 1 year ago

The problem is that android auto is restricted to apps installed from the play store.

The F-Droid Version supports Android Auto, but it's blocked by Google.

I managed to enable it by spoofing the installer-package during installation.

For me, the navigation is near unusable. Location tends to lag behind by a few seconds when running on Android Auto. On my phone it's fine.

[-] heyfrancis@lemmy.ml 3 points 1 year ago

I managed to enable it by spoofing the instaler-package during installation.

How to do this?

[-] alphafalcon@feddit.de 2 points 1 year ago

I built a custom app to do it since I couldn't manage to fire the relevant intents from an adb shell without root.

I lifted the code from AAAD

Specifically the InstallAPK method in MainActivity.java

Intent intent;

            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
                intent = new Intent(Intent.ACTION_INSTALL_PACKAGE);
                intent.setData(getUri(file));
                intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_ACTIVITY_NEW_TASK);
            } else {
                intent = new Intent(Intent.ACTION_VIEW);
                intent.setDataAndTypeAndNormalize(Uri.fromFile(file), "application/vnd.android.package-archive");
                intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            }

            intent.putExtra(Intent.EXTRA_NOT_UNKNOWN_SOURCE, true);
            intent.putExtra(Intent.EXTRA_INSTALLER_PACKAGE_NAME, "com.android.vending");
            getApplicationContext().startActivity(intent);
        } 

Basically you construct an Intent ACTION_INSTALL_PACKAGE with data pointing to the APK file and the extras EXTRA_NOT_UNKNOWN_SOURCE=true and EXTRA_INSTALLER_PACKAGE_NAME="com.android.vending" which tells the installer that this APK is not sideloaded and it's the play store asking to install it.

You might still need to enable unknown sources in Android Auto developer settings (separate from phone developer settings).

If I remember, I'll try to pull the code for my app from my PC and post it.

[-] heyfrancis@lemmy.ml 4 points 1 year ago

Now that you mentioned AAAD, i found out about the other app for root devices - https://github.com/shmykelsa/AA-Tweaker

This works for me, so now OsmAnd is showing up in my Android Auto screen.

Thanks for the tip

this post was submitted on 24 Oct 2023
34 points (100.0% liked)

Free and Open Source Software

17949 readers
3 users here now

If it's free and open source and it's also software, it can be discussed here. Subcommunity of Technology.


This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.

founded 2 years ago
MODERATORS