From f2255b794089e14f5bf976d060a2267f77d5f8d4 Mon Sep 17 00:00:00 2001 From: Daniel Huckaby Date: Mon, 30 Sep 2024 22:06:46 -0500 Subject: [PATCH] Removed warning --- docs/learnings/2024-08-25-dynamic-app-icons.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/learnings/2024-08-25-dynamic-app-icons.md b/docs/learnings/2024-08-25-dynamic-app-icons.md index a9d9905..6ff9686 100644 --- a/docs/learnings/2024-08-25-dynamic-app-icons.md +++ b/docs/learnings/2024-08-25-dynamic-app-icons.md @@ -6,7 +6,7 @@ hide: Have you ever wanted to swap your Android app's icon at runtime? It could be useful as a premium feature or as a way for your users to customize the feel of your application. I have a solution that works for the most part, with some drawbacks that will need to be weighed before implementing it into your application. -Starting off this is the exact same method seen in applications such as Discord or Todoist. The main drawback is that the first time we enable this new behavior your application will be closed automatically as your new icon is applied. Subsequent calls to reset or switch to any other icons will not result in your application closing. This is undefined behavior, and I have no workaround for it. If that is fine, let's get into the weeds. +Starting off this is the exact same method seen in applications such as Discord or Todoist. The main drawback is that the first time we enable this new behavior your application will be closed automatically as your new icon is applied. Subsequent calls to reset or switch to any other icons will not result in your application closing. This is undefined behavior, and I have no workaround for it. ### Activity alias Traditionally I have only ever used an [activity-alias](https://developer.android.com/guide/topics/manifest/activity-alias-element) to redirect my launching activity reference when I have moved the actual class into a new package. We are going to be leveraging that concept to not only redirect once to our launching activity, but many times depending on how many icons you want. The catch is that by default only one of those should be enabled. That way you can at runtime switch between them by enabling and disabling aliases, resulting in the perception of the icon changing to the user.