[AC-3289] 'Ti.App.Android.appVersionCode' & 'Ti.App.Android.appVersionName' property of android gives undefines when run on device
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | n/a |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2014-04-04T05:58:34.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Alloy, Documentation, Titanium SDK & CLI |
Labels | android, androidmanifest, androidversion |
Reporter | sagar k patel |
Assignee | Ritu Agrawal |
Created | 2014-04-02T06:29:13.000+0000 |
Updated | 2016-03-08T07:57:42.000+0000 |
Description
I am trying to fetch the appVersionCode & appVersionName from tiApp.xml gives me 'undefined'. I am trying to fetch this data using 3.2.2.GA sdk.
Below Code I am trying:
~~~
var win = Ti.UI.createWindow({
backgroundColor : '#fff'
});
if(Ti.Platform.name === "android"){
Ti.API.info('version code-->'+Ti.App.Android.appVersionCode);
Ti.API.info('version name-->'+Ti.App.Android.appVersionName);
}
win.open();
~~~
Is there any other way to get the appVersionName and appVersionCode from tiApp.xml in android...?
Thank you for reporting this issue. This is a known enhancement and has been implemented for next major release (3.3.0). Please track TIMOB-15267 for this issue.
Thank you Ritu