Create Icon & Splash Screen


#1

Hi all,
I’ve some troubles with the automatic creation of icons and splash screen.
I have created the new icon.png and new splash.png of required dimensions.
When I launch the command ionic resources or ionic resources --splash (ionic resources --icon).

The strange thing is that some icons have been created, instead none splash have been created.

My version of ionic is 1.7.14

Please help me.


#2

@ddelfio
Check this required points to generate resources

  • Image format : .png, .psd or .ai
  • Icon should be minimum 192x192px and have no rounded corners.
  • Splash should be minimum 2208x2208px.
  • Add platform to generate resources.

Reference : http://blog.ionic.io/automating-icons-and-splash-screens/

I did some testing on ionic 1.7.14 and I had no problems.


#3
  1. you must add platform in your project use ionic platform add android or ionic platform add ios
  2. then run this command ionic resource --icon and or ionic resource --splash
  3. Next step, put your icon file on “resources/android/icon/” and for splashscreen in “resources/android/splash/”
  4. Note : check your config.xml. see code bellow :
    <platform name="android"> <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" /> <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" /> </platform>

there is file names that executed by ionic for generate icons and splashscreen. So, make sure that your file name is same with it. for ldpi, mdpi, hdpi, xhdpi, etc, it’s just a dimension of the image.

then build your project into apk file, hope this help you. and i’m sorry for my bad english.


#4

Thank you so much guys: I would like to know if the script “ionic resource” connects himself to some url, because the execution of the script writes “Upload image” and maybe in my company there is slow internet and this can cause troubles. Don’t you?
I added both platforms and launched the build of the project. I also created images from ionic templates so I think that it’s correct.
Thank you again


#5

I think when we build use ionic build --release android, it’s just move your icon file from “resources/android/icon/” to “platforms/android/res” and rename it. but that’s just my thoughts, and i didn’t know what happened absolutely. and for splashscreen didn’t show, some people said that its caused by crosswalk.


#6

I have followed all the steps in that guide. Thank you. What I can’t figure out it is why sometimes it works because once I have done the splash and after I made some changes it was impossible to recreate them.
Thanks


#7

It’s changed to ionic resources in ionic cli 2.0