androidadaptive-icon

Adaptive icon doesn't work on rootless pixel launcher


I added an adaptive icon to my app. It works fine on Pixel and Pixel 2. But on a Nexus 6 with the rootless pixel launcher it doesn't work. I can see other round icons on the Nexus 6 so it is working for other apps.

My manifest looks like this:

  <application
        android:name=".MyAppclass"
        android:allowBackup="true"
        android:hardwareAccelerated="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:largeHeap="true"
        android:theme="@style/MyTheme">

And on mipmap-anydpi-v26 I have ic_launcher.xml that looks like this:

<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
    <background android:drawable="@drawable/ic_background_icon"/>
    <foreground android:drawable="@drawable/ic_foreground_icon"/>
</adaptive-icon>

What am I missing?

Thanks.


Solution

  • Turns out I need the roundIcon attribute on the AndroidManifest.xml also.

    https://github.com/amirzaidi/Launcher3/issues/421#issuecomment-372961568