Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to set alternate app icons in maui Android!! #22703

Open
lakhan-bairawat opened this issue May 29, 2024 · 6 comments
Open

Unable to set alternate app icons in maui Android!! #22703

lakhan-bairawat opened this issue May 29, 2024 · 6 comments
Labels
area-single-project Splash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizer migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert platform/android 🤖 s/needs-attention Issue has more information and needs another look t/bug Something isn't working

Comments

@lakhan-bairawat
Copy link

Description

Previously, in Xamarin.Forms, we can set alternate app icons by registering multiple icons in the Android manifest and iOS Info.plist files. This allowed us to change the app icon and app name based on an identifier.

However, in .NET MAUI 7, achieving the same functionality
but it's not supported in .net 8 android .
In .NET 7 MAUI:

For Android: You can still use the previous method of registering multiple icons in the Android manifest file. This allows you to change the app icon based on an identifier.

For iOS: Use the CFBundleAlternateIcons key in the Info.plist file to define alternate app icons. Then, you can use the UIApplication.SharedApplication.SetAlternateIconName method to change the app icon dynamically.

In .NET 8 MAUI:

For Android: Since Android does not support adding alternative icons,

For iOS: You can still use the CFBundleAlternateIcons key in the Info.plist file and the UIApplication.SharedApplication.SetAlternateIconName method to define and change alternate app icons as needed.

Please offer an alternative method to achieve this.

Steps to Reproduce

No response

Link to public reproduction project repository

No response

Version with bug

8.0.20 SR4

Is this a regression from previous behavior?

Yes, this used to work in Xamarin.Forms

Last version that worked well

8.0.20 SR4

Affected platforms

Android

Affected platform versions

Android All Versions

Did you find any workaround?

No response

Relevant log output

No response

@lakhan-bairawat lakhan-bairawat added the t/bug Something isn't working label May 29, 2024
Copy link
Contributor

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@mattleibow
Copy link
Member

Are you able to elaborate on "Android does not support adding alternative icons"?

Did a version of Android lose the ability to have multiple icons? Are multiple icons not being generated?

Can you provide a sample where you expect the icons to work, but it does not?

@mattleibow mattleibow added s/needs-info Issue needs more info from the author s/needs-repro Attach a solution or code which reproduces the issue labels May 30, 2024
@PureWeen PureWeen added the area-single-project Splash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizer label May 31, 2024
@dotnet-policy-service dotnet-policy-service bot added the s/no-recent-activity Issue has had no recent activity label Jun 5, 2024
@lakhan-bairawat
Copy link
Author

please check the code for this issue on below git repo.
https://github.com/lakhan-bairawat/MauiBuugs

@dotnet-policy-service dotnet-policy-service bot added s/needs-attention Issue has more information and needs another look and removed s/needs-info Issue needs more info from the author s/needs-repro Attach a solution or code which reproduces the issue s/no-recent-activity Issue has had no recent activity labels Jun 6, 2024
@lakhan-bairawat
Copy link
Author

lakhan-bairawat commented Jun 6, 2024

Are you able to elaborate on "Android does not support adding alternative icons"?

.net 7 i can change the app icon and name on runtime but not support in .net 8

Did a version of Android lose the ability to have multiple icons? Are multiple icons not being generated?

i have multiple icon and i want to set icon based on id

Can you provide a sample where you expect the icons to work, but it does not?

please check the code for this issue on below git repo.
https://github.com/lakhan-bairawat/MauiBuugs

@lakhan-bairawat
Copy link
Author

please share the solution for this issue

@RoiChen001 RoiChen001 added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert labels Jun 25, 2024
@RoiChen001
Copy link
Collaborator

I can repro this issue at Android platform on the latest 17.11.0 Preview 2.1(8.0.60&8.0.40).

@samhouts samhouts removed s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-single-project Splash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizer migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert platform/android 🤖 s/needs-attention Issue has more information and needs another look t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants