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-6038] Expose tiapp.xml Props to App Properties #1395

Merged
merged 1 commit into from
Feb 15, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions support/android/templates/AppInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public final class ${config['classname']}AppInfo implements ITiAppInfo
public ${config['classname']}AppInfo(TiApplication app) {
%if len(app_properties.keys()) > 0:
TiProperties properties = app.getSystemProperties();
TiProperties appProperties = app.getAppProperties();
%for property in app_properties.keys():
%try:
<%
Expand All @@ -28,6 +29,7 @@ public final class ${config['classname']}AppInfo implements ITiAppInfo
setter = 'set%s' % type[0:1].upper() + type[1:]
%>
properties.${setter}("${property}", ${javaValue});
appProperties.${setter}("${property}", ${javaValue});
%except:
Log.w(LCAT, "Couldn't convert application property '${property}', with value '${value}' to ${type}, skipping.");
%endtry
Expand Down