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

[TIMOB-23645] Android: Added Color to Android notification color behind icon #9444

Merged
merged 11 commits into from Nov 10, 2017
Merged

Conversation

dieskim
Copy link
Contributor

@dieskim dieskim commented Sep 19, 2017

JIRA: https://jira.appcelerator.org/browse/TIMOB-23645

  • Added Color to Android notification color behind icon
  • Added Documentation

@hansemannn hansemannn added this to the 7.0.0 milestone Sep 19, 2017
@hansemannn hansemannn changed the title [TIMOB-23645] Added Color to Android notification color behind icon [TIMOB-23645] Android: Added Color to Android notification color behind icon Sep 19, 2017
# Conflicts:
#	android/modules/android/src/java/ti/modules/titanium/android/notificationmanager/NotificationProxy.java
}
setProperty(TiC.PROPERTY_COLOR, color);
}

@Kroll.method @Kroll.setProperty
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check the indentation. I fixed it previously but you want to check this as well - maybe for future PR's 😙.

Copy link
Collaborator

@hansemannn hansemannn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CR passed. Awaiting another peer-review from @ypbnv.

Copy link
Contributor

@ypbnv ypbnv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check comments.

@@ -71,6 +72,9 @@ public void handleCreationDict(KrollDict d)
if (d.containsKey(TiC.PROPERTY_LARGE_ICON)) {
setLargeIcon(d.get(TiC.PROPERTY_LARGE_ICON));
}
if (d.containsKey(TiC.PROPERTY_COLOR)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix indentation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -183,7 +187,16 @@ public void setLargeIcon(Object icon)
}
setProperty(TiC.PROPERTY_LARGE_ICON, icon);
}


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove spaces from empty lines - here and on line 199.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@Kroll.method @Kroll.setProperty
public void setColor(String color)
{
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, import android.os.Build
One extra bracket is added after the if statement.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

- removed spaces
- imported android.os.Build
Copy link
Contributor

@ypbnv ypbnv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CR: Pass


See Android Reference for the [color](https://developer.android.com/reference/android/app/Notification.html#color) property.
type: String
since: "7.0.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also add osver: {android: {min: "5.0"}}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@garymathews - I see this has not been approved yet?

@build
Copy link
Contributor

build commented Oct 26, 2017

Fails
🚫

🔬 There are library changes, but no changes to the unit tests. That's OK as long as you're refactoring existing code, but will require an admin to merge this PR. Please see README.md#unit-tests for docs on unit testing.

Generated by 🚫 dangerJS

@lokeshchdhry
Copy link
Contributor

FR Passed.

Notification shows the specified color.

Studio Ver: 4.10.0.201709271713
SDK Ver: 7.0.0 local build
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 6P --- Android 8.0.0
⇨ google Nexus 5 --- Android 6.0.1

@lokeshchdhry
Copy link
Contributor

@sgtcoolguy , can you please merge this PR. Its a community PR, probably unit tests can't be added.

@sgtcoolguy sgtcoolguy merged commit 6189596 into tidev:master Nov 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants