android_notify icon indicating copy to clipboard operation
android_notify copied to clipboard

Auto Use a Apps Custom icon instead of default library Logo

Open Fector101 opened this issue 1 month ago • 3 comments

Describe issue When user has a custom app icon use that automatically instead of Library's(kivy,flet) fallback icons

Code to Reproduce

  • This issue started in v1.61.10 for kivy but it should be in all versions of Flet

Fixes

  • This can be easily fixed by using setSmallIcon, But it would be better to have a auto fix for this by an api to check if user has specified a custom icon as app logo

Fector101 avatar Oct 03 '26 16:10 Fector101

  • checking the alpha channel will consume time

Fector101 avatar Oct 04 '26 12:10 Fector101

This worked

import os

from android_notify import Notification
from utils.helper import appFolder  # /data/user/0/org.wally.waller/files

app_base = os.path.join(appFolder(),"app")
Notification.app_icon=os.path.join(app_base,"assets","icons","icon.png")

Then anywhere Notification class is used in the file will be the Custom Icon

Fector101 avatar Oct 05 '26 13:10 Fector101

import os
from android_notify import Notification
from android_notify.widgets.images import get_img_absolute_path

img_relative_path = os.path.join("assets","icons","icon.png")
Notification.app_icon = get_img_absolute_path(img_relative_path)

Fector101 avatar Oct 07 '26 19:10 Fector101