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

Android app icon in background mode shows default icon initially #293

Closed
Mr-Anonymous opened this issue Mar 12, 2022 · 2 comments
Closed

Comments

@Mr-Anonymous
Copy link

I created the adaptive icon for my Ionic 6 Android 10 App. The App Icon works, however when the App goes to background, it is showing the default Android App there initially. Only after closing the app and subsequent launches, the icon gets replaced with app icon. Why is that issue happens? Also doesn't cordova-res suppose to generate mipmap-anydpi-v26 icons as well?
nN3Gj

My config.xml file looks like this:

       <icon background="resources/android/icon/ldpi-background.png" density="ldpi" foreground="resources/android/icon/ldpi-foreground.png" />
        <icon background="resources/android/icon/mdpi-background.png" density="mdpi" foreground="resources/android/icon/mdpi-foreground.png" />
        <icon background="resources/android/icon/hdpi-background.png" density="hdpi" foreground="resources/android/icon/hdpi-foreground.png" />
        <icon background="resources/android/icon/xhdpi-background.png" density="xhdpi" foreground="resources/android/icon/xhdpi-foreground.png" />
        <icon background="resources/android/icon/xxhdpi-background.png" density="xxhdpi" foreground="resources/android/icon/xxhdpi-foreground.png" />
        <icon background="resources/android/icon/xxxhdpi-background.png" density="xxxhdpi" foreground="resources/android/icon/xxxhdpi-foreground.png" />
        <splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
        <splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
        <splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
        <splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
        <splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
        <splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
        <splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
        <splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
        <splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
        <splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
        <splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
        <splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
        <hook src="hooks/copy_android_notification_icons.js" type="after_prepare" />
        <icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
        <icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
        <icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
        <icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
        <icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
        <icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />

My Ionic Info:

Ionic:

   Ionic CLI                     : 6.18.1 (/Users/neel/.nvm/versions/node/v17.4.0/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 6.0.5
   @angular-devkit/build-angular : 13.0.4
   @angular-devkit/schematics    : 13.0.4
   @angular/cli                  : 13.0.4
   @ionic/angular-toolkit        : 5.0.3

Cordova:

   Cordova CLI       : 11.0.0
   Cordova Platforms : android 10.1.1, ios 6.2.0
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 9 other plugins)

Utility:

   cordova-res : 0.15.4
   native-run  : 1.5.0

System:

   Android SDK Tools : 26.1.1 (/Users/neel/Library/Android/sdk)
   ios-sim           : 8.0.2
   NodeJS            : v17.4.0 (/Users/neel/.nvm/versions/node/v17.4.0/bin/node)
   npm               : 8.3.1
   OS                : macOS Monterey
   Xcode             : Xcode 13.2.1 Build version 13C100
@mlynch
Copy link
Contributor

mlynch commented Mar 23, 2022

I saw this happen with my own testing of the new version of this tool (see #291), but it resolved itself after booting. I think it's just an oddity of Android when doing local development. I assume this is local?

@Mr-Anonymous
Copy link
Author

Thanks for the clarification. I think you are right. Also I noticed I usually notice this android icon when my phone is connected to my mac while running the application for debugging. But once it's disconnected and when the app is relaunched another time, the correct app icon seems to be showing fine.

I will close this issue then in that case. Thanks for your comment @mlynch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants