[TIMOB-23645] Android notification: allow to set color of background
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2017-11-10T18:56:27.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 7.0.0 |
Components | Android |
Labels | n/a |
Reporter | Thibault Lenclos |
Assignee | Hans Knöchel |
Created | 2016-07-06T15:41:45.000+0000 |
Updated | 2017-11-10T21:45:44.000+0000 |
Description
Currently we can't set the color of the circle notification on Android. T
here is no method setColor on ti.cloudpush or style variable that we can override.
Hello, Thanks for submitting the request. Can you share a demonstration of how this works in native platform? Our engineers will look into it. We will let you know if and when we will include this feature in ti.cloudpush.
This is the method used in native android development : [https://developer.android.com/reference/android/app/Notification.Builder.html#setColor(int)] , and this post describe how to do it : [http://stackoverflow.com/questions/27343202/changing-notification-icon-background-on-lollipop]
Has this still not been implemented??
@Eric Merriman - I have added a Pull request that adds this ability - as this is my first I have signed the CLA as well. I am not sure what other tests, docs etc need to be done or if there is anywhere else in the code you would like me to add this? One concern I have is that this will not work on Android < 5 and I see we still support Android 4. Will this automatically fail or should we code in some check to ignore it on Android 4? Usage:
[~dieskim] Can you link your pull-request here? We are currently doing house-keeping for 7.0.0 and would need to reschedule it otherwise. Thank you!
sure but I am not sure what to do exactly...I thought it was already linked? Did you mean add a link here? https://github.com/appcelerator/titanium_mobile/pull/9444
Yes, thank you!
FR Passed. Waiting for merge to get enabled.
PR merged.
Verified the fix with SDK 7.0.0.v20171110104246. Closing. Studio Ver: 4.10.0.201709271713 SDK Ver: 7.0.0.v20171110104246 OS Ver: 10.12.3 Xcode Ver: Xcode 8.3.3 Appc NPM: 4.2.10 Appc CLI: 6.3.0 Ti CLI Ver: 5.0.14 Alloy Ver: 1.10.7 Node Ver: 7.10.1 Java Ver: 1.8.0_101 Devices: ⇨ google Nexus 5 --- Android 6.0.1 ⇨ google Nexus 6P --- Android 8.0.0