[TIMOB-24659] Android: Add support for the roundIcon attribute
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2019-01-09T23:17:20.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 6.2.0, Release 8.0.0 |
Components | Android, Tooling |
Labels | n/a |
Reporter | Luc-Edmond Gaspard |
Assignee | Gary Mathews |
Created | 2017-05-05T00:40:23.000+0000 |
Updated | 2019-01-09T23:17:51.000+0000 |
Description
Android 7.1 allow applications to show a circular icon in the launcher, for devices that supports them (ex. Pixel & Pixel XL).
Titanium should support the android:roundIcon attribute in AndroidManifest.xml.
<application android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" >
https://github.com/appcelerator/titanium_mobile/pull/9019
Thank you [~gaspard.le]! Hey [~gmathews], can you check this? Looks like a simple addition to the manifest.
Verified the fix. Specifying
android:roundIcon="@mipmap/ic_launcher_round"
in thetiapp.xml
add it to theandroidmanifest.xml
. Build picks up the correct icons if round icons are included in theplatform/android/res/
folder if app is built for android 25 & above. Closing. Studio Ver: 4.9.0.201705302345 SDK Ver: 6.2.0.v20170626084207 OS Ver: 10.12.3 Xcode Ver: Xcode 8.3.3 Appc NPM: 4.2.9 Appc CLI: 6.2.2 Ti CLI Ver: 5.0.14 Alloy Ver: 1.9.11 Node Ver: 6.10.1 Java Ver: 1.8.0_101 Devices: ⇨ google Nexus 5 --- Android 6.0.1 ⇨ google Pixel --- Android 7.1.1 Emulator: Android 4.4.2The fix is valid but it seems it never made it into a release and its mistakenly marked as closed in version 6.2.0 Check https://github.com/appcelerator/titanium_mobile/blob/master/android/cli/lib/AndroidManifest.js. It is not even included in 6.2.0 branch
This is interesting. I cannot find it on master and 6_2_X either. But in any case, I think using [adaptive icons](https://developer.android.com/guide/practices/ui_guidelines/icon_design_adaptive) on Android is the way moving forward these days anyway. It adapts the icon (round, square, dynamic) based on the API-level and manufacturer. We use it for our [hyperloop-examples](https://github.com/appcelerator/hyperloop-examples) app and they can simply be created via a sample project in Android Studio and then be copied over to your app. Still, we should check what was going wrong here.
master: https://github.com/appcelerator/titanium_mobile/pull/10598
Master PR Merged.