• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
2
Question by Klvana · Feb 26, 2015 at 11:54 AM · androidiconnotification

White notification icon - Android 5.0 Lollipop

Hello, when android:targetSdkVersion is set to higher version than 20,a white box notification icon is displayed in the status bar, instead of the real colored app icon. Android 5.0 allows only white notification icons in the status bar, according to this:

http://www.reddit.com/r/androiddev/comments/2nz0bt/my_app_notification_has_weird_icon_on_android/ http://developer.android.com/design/patterns/notifications.html

It is possible to set the notification icon in Unity editor somehow? What if we want to use white notification icon for SdkVersion > 20 and another colored notification icon for SdkVersion <= 20?

Thank you for help

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image haddad · Mar 13, 2015 at 06:24 PM 0
Share

Did you solve this by any chance?

avatar image Klvana · Mar 26, 2015 at 01:00 PM 0
Share

unfortunately not :(

8 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by Bilelmnasser · Feb 19, 2016 at 09:38 AM

 //add this line to your android manifest file : i have tested this !!
   <!-- GCM requires Android SDK version 2.2 (API level 8) or above. -->
     <uses-sdk
         android:minSdkVersion="8"
         android:targetSdkVersion="16" /> 
Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
1

Answer by cdes · Mar 27, 2015 at 04:43 PM

We're using a plugin called ELAN. It lets you use an icon different from the app icon which will be used for the notification.

Here's the plugin: https://www.assetstore.unity3d.com/#!/content/9484

The trick is to use this to generate your notification icon: http://romannurik.github.io/AndroidAssetStudio/icons-notification.html

The drawable folders should be inside this folder: (Assets/Plugins/Android/res/)

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
1

Answer by Voxel-Busters · Jun 04, 2015 at 12:07 PM

Basically you need to setSmallIcon of notification builder to the required bitmap.

Just to let you know, We recently released Cross Platform Native Plugins

This handles coloured and white icons according to the target platform.

If you can let me know which plugin you are using probably I can guide you better.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
1

Answer by funx · Jun 26, 2015 at 02:11 AM

I haven't tested it myself but I heard if you set the targetSdk < lollipop then it'll work:

   <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="19" />
 
Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
1

Answer by Yuriy-Ivanov · Oct 15, 2015 at 01:11 AM

Hi @Klvana,

  • What if we want to use white notification icon for SdkVersion > 20 and another colored notification icon for SdkVersion <= 20?

This is gracefully solved in our plugin UTNotifications. It provides you two options: enabling Android 4.4 Compatibility Mode (which sets targetSdkVersion to 19) or set separate notification icons for Android 5.0+ and lesser versions of Android. It also contains solutions for other Android (and not only) related issues, f.e. restores scheduled notifications after a device reboot, which is not supported by Android directly.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
  • 1
  • 2
  • ›

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

12 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

After installing the .apk , the App Icon appears twice 1 Answer

Custom push notification sound in android build doesn't work 0 Answers

Android App Icon for xxxhdpi 0 Answers

Android Push Notifications stopped working using GMS? 0 Answers

Send Push Notifications to Android Device 5 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges