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-15267] Exposed versionName and VersionCode #5145
Conversation
return appVersionName; | ||
} | ||
|
||
private static void initializeVersionValues() { |
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.
Have you trying putting the content of this method to TiPlatformHelper.initialize() ? That way you don't need to do null checks in the getter.
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 this doesn't look like a frequently used property, I thought on-demand initialization is better as we don't take the performance penalty during app initialization.
Please add documentation for the new APIs. |
@@ -205,6 +205,16 @@ public String getRuntime() | |||
return KrollRuntime.getInstance().getRuntimeName(); | |||
} | |||
|
|||
@Kroll.getProperty @Kroll.method | |||
public int getAppVersionCode() { |
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.
Are these Android only APIs? If that's the case, they should be implement in ../modules/titanium/platform/AndroidModule.java.
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.
Yes, these are Android specific APIs, I will move to AndroidModule.
Took care of review comments |
summary: | | ||
The version number of the application. | ||
type: Number | ||
since: 3.2.0 |
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.
3.3.0
Please also add a test case in the ticket. |
Code reviewed. Please address comments |
This code must not be in the Ti.Media.Android but rather in Ti.App since these are app specific properties. Code Reviewed. REJECTED |
- name: appVersionName | ||
summary: | | ||
The version name of the application. | ||
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.
String
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.
Will do
Addressed review comments |
CR + FR Passed. APPROVED |
[TIMOB-15267] Exposed versionName and VersionCode
[TIMOB-15267] Exposed versionName and VersionCode
https://jira.appcelerator.org/browse/TIMOB-15267