Titanium JIRA Archive
Appcelerator Community (AC)

[AC-3289] 'Ti.App.Android.appVersionCode' & 'Ti.App.Android.appVersionName' property of android gives undefines when run on device

GitHub Issuen/a
TypeImprovement
Priorityn/a
StatusClosed
ResolutionDuplicate
Resolution Date2014-04-04T05:58:34.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAlloy, Documentation, Titanium SDK & CLI
Labelsandroid, androidmanifest, androidversion
Reportersagar k patel
AssigneeRitu Agrawal
Created2014-04-02T06:29:13.000+0000
Updated2016-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(); ~~~

Comments

  1. sagar k patel 2014-04-02

    Is there any other way to get the appVersionName and appVersionCode from tiApp.xml in android...?
  2. Ritu Agrawal 2014-04-02

    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.
  3. sagar k patel 2014-04-04

    Thank you Ritu

JSON Source