Is it possible to set separate icons for application if we set android:debuggable=true in manifest and if we set android:debuggable=false like in iOS?
I'm a bit late the party, but anyway. At the moment I'm posting this in '16, you actually can have different launch icon set simply putting them to respective directories, not sure how it was back in '13 though. To achieve that you need to create debug/res directories under app/src and place your mipmap or drawable directories there. So you'll have app/src/main/res/ and app/src/debug/res/ paths. Android will have higher priority for build-related resource directory - to main directory. Place your debug and release resources to the appropriate paths and you'll have what you want. Do all of above considering you have to use Gradle build system.
Here you can read more about stuff like that: http://tools.android.com/tech-docs/new-build-system/resource-merging
a bit late (actually about 8 years), but while I was browsing DuckDuckGo's Android source code today, I found out that they do it this way:
in your app/build.gradle
(DuckDuckGo's app/build.gradle
)
android {
...
buildTypes {
debug {
...
manifestPlaceholders = [
appIcon: "@mipmap/ic_launcher_blue",
appIconRound: "@mipmap/ic_launcher_blue_round"
]
}
release {
...
manifestPlaceholders = [
appIcon: "@mipmap/ic_launcher_red",
appIconRound: "@mipmap/ic_launcher_red_round"
]
}
}
...
}
and in your AndroidManifest.xml
just use (DuckDuckGo's AndroidManifest.xml
)
<application
...
android:icon="${appIcon}"
android:roundIcon="${appIconRound}"
...
/>
...
</application>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With