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-25045] Android: Implement Ti.Android.NotificationChannel #9305
Conversation
a4e75cf
to
e0eaa9c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few docs-questions!
apidoc/Titanium/Android/Android.yml
Outdated
Used with [NotificationChannel](Titanium.Android.NotificationChannel) to specify an importance level. | ||
type: Number | ||
permission: read-only | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since: "7.0.0"
for all of these? Or is it scheduled for 6.2.0?
|
||
- name: vibratePattern | ||
summary: The vibration pattern for notifications posted to this channel. | ||
type: Array |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Array of what?
osver: {android: {min: "8.0"}} | ||
description: | | ||
Create a notification channel. | ||
parameters: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does not need multi-line-wrapping, but it's no big deal.
e0eaa9c
to
8f9f3cd
Compare
@garymathews Jenkins is failing because of docs-issues:
|
3c5700f
to
4eb0e78
Compare
public static final String PROPERTY_ENABLE_RETURN_KEY = "enableReturnKey"; | ||
|
||
/** | ||
* @module.api | ||
*/ | ||
public static final String PROPERTY_ENABLE_VIBRATION = "enableVibrations"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The property string is set to "enableVibrations" with an 's', but you document this property without an 's'. This is a typo, right?
type: Boolean | ||
|
||
- name: description | ||
summary: user visible description of this channel. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Capitalize "user" in sentence.
type: Boolean | ||
|
||
- name: vibratePattern | ||
summary: The vibration pattern for notifications posted to this channel. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should document how this array of numbers work. I believe each array element is a duration in milliseconds, right? Where the even indexed elements (ex: 0, 2, 4, 6, etc.) is the vibration time and the odd indexed elements are how long to wait between vibrations.
|
||
- name: lockscreenVisibility | ||
summary: Whether or not notifications posted to this channel are shown on the lockscreen in full or redacted form. | ||
type: Number |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should define constants for the "lockscreenVisibility" property:
VISIBILITY_PRIVATE = 0
VISIBILITY_PUBLIC = 1
VISIBILITY_SECRET = -1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or at least document what numbers are supported.
type: Number | ||
|
||
- name: id | ||
summary: The channel id specified for the notification channel. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indicate that this is a unique string ID defined by the Titanium developer.
summary: Create a notification channel. | ||
parameters: | ||
- name: parameters | ||
summary: Properties to set on a new object, including any defined by <Titanium.Android.NotificationChannel> except those marked not-creation or read-only. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Document that this function will return null on Android OS version older than Android 8.
f790134
to
64a5595
Compare
@jquick-axway Updated PR |
Generated by 🚫 dangerJS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CR: Pass
4cb9950
to
9cf49ec
Compare
d0cf1fd
to
444f444
Compare
FR Passed. Notification channel works as expected along with its properties.
Studio Ver: 4.10.0.201709271713 |
REQUIRES #9274 TO BE MERGEDTitanium.Android.NotificationChannel
TEST CASE
JIRA Ticket