9

This is my first question on StackOverflow, so please bear with me if I fail to articulate my question.

I am working on an Android app that targets Android O, and I want the launcher to NOT show the icon adapted i.e. remove the white background. I tried to use adaptive icons and they work, but the problem is that they change the icon itself making it rouned, square, squircle and tear-shaped.

At first I thought it's out of my hands, but some other apps (facebook, whatsapp and snapchat for example) have their icons unchanged.

tl;dr: How can I force an icon to be used by the launcher on Android O?

Latiif alSharif
  • 156
  • 3
  • 5

2 Answers2

7

The other apps you mention (Facebook, Whatsapp, and Snapchat) don't yet target Android O. Once they do, they'll also be forced to have an adaptive icon as well.

ianhanniballake
  • 191,609
  • 30
  • 470
  • 443
  • that being said, it looks like you could change your target sdk version to get the result you desire – dazza5000 Jan 16 '18 at 20:38
  • 3
    @dazza5000 - given the [requirement to target API 26 by November 2018](https://android-developers.googleblog.com/2017/12/improving-app-security-and-performance.html), that is, at best, a temporary workaround. – ianhanniballake Jan 16 '18 at 20:39
  • hehehehe - i knew ian would protest :) it is good to be mindful of the api bump in november – dazza5000 Jan 16 '18 at 20:42
  • But that would also deprive me of the perks of targeting API 26. Thanks for shedding light on that. – Latiif alSharif Jan 16 '18 at 20:43
  • 2
    Yep, how launchers treat apps that target API 26 will be different (it isn't the system that forces the white background, but the launcher), but for the Google created launchers, you should assume an adaptive icon is a requirement for targeting API 26. – ianhanniballake Jan 16 '18 at 20:49
1

Just remove the targetSdkVersion property from your app level build.gradle file. It will work.

Sahil Garg
  • 263
  • 1
  • 20