-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Tutorial of solutions for icons and colors #335
Comments
Update: Natively Android will use a white icon. Some phones (some Samsung devices) will honor your real icon. Other phones (like LG K20+) will use the Android spec white icon. On my LG phone its a white square. However, you can still get an outline of your logo in the status bar...and when the status bar drops down to actually view the notification you will see your real icon. To do this, use these instructions: transparent png icon Then you will need will need to make appropriate sized copies of that png file (ie: 192x192) and copy each one into its respective folder: /projectRoot/platforms/android/res/mipmap-XXXXX In my folders I already has my main app icon called "icon.png"....I just added the new transparent png file as "icontrans.png" (note: lowercase lettering ONLY...no dashes, symbols, upper case, etc). Then when you do your actual push from your server (see above) you set |
My solution, based on this thread and the comment on #53 (comment) was:
Hope this helps! |
Closing as resolved. If desired, I'll accept a PR to add this info to the README. |
…rebase Crashlytics. Resolves arnesson#335.
…rebase Crashlytics. Resolves arnesson#335. # Conflicts: # CHANGELOG.md # README.md
Please try to keep this thread clutter free of questions - lets use it to only post working solutions. If you have a method that is different than the one below, please post it with step by step instructions (please don't assume certain steps, actually outline them for us)
==========================================
Like many others, i have not been able to get colors or custom icons to work as instructed in the plugin specs. However, without having to do any special specific downloads or xml configurations (and I am using Ionic v1.78) I was able to get the following to work.
I am passing the following values from my server side script. The upside of this technique is you can preload multiple images, icons for different types of messages:
'icon' is the same 'icon.png' image that is in all the /platforms/android/res/mipmap-(x)dpi folders. I also got the screen image to work using 'screen.png (ie: 'icon' => 'screen') that is in all the platforms/android/res/drawable-(x)dpi folders. Not certain which folder its specifically using...as there are different sized versions of the same 'screen.png' or 'icon.png' in all of those various folders.
There is even a method to pass a URL to icon so it uses a remote server icon - however I haven't tried this method yet.
Caveat:
Now, that being said, I have seen different responses on different phones when supplying the color from the server side script.
1a is what we would all want for both the status bar opened and closed. 2b could at least be acceptable. But there seems no clear way to merge 1a and 2b to at least come up with a more universal method that would (probably) accommodate most phone types.
I am still testing and researching methods....hoping to find a more universal method. I have 2 more Android phones and my iPhone I will be testing on later. Will post results when I do.
The text was updated successfully, but these errors were encountered: