Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-15267

Android: Expose versionName and versionCode inside the Ti.App.Android

    Details

      Description

      I think it would be very useful to expose the versionName and versionCode on Ti.Platform.

      First for creating dynamic About Windows and for internal migration procedures relying on this information.

      And second (and this is the most important for me), for getting the app build number that the client is using. This is specially useful for Beta Testing (through the Google Play Store) and for fast iteration of app versions, when you need to identify which version/build the user is running.

      This way I can always get the accurate user's app build number.

      There is a way of doing that in Android SDK:

      PackageInfo pinfo = getPackageManager().getPackageInfo(getPackageName(), 0);
      int versionCode = pinfo.versionCode;
      String versionName = pinfo.versionName;
      

      I think you guys should map that inside Ti.Platform so we can access it dynamically.

      Something like Ti.Platform.versionCode and Ti.Platform.versionName (of course they are Android only).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sunila Sunila
                Reporter:
                ygbr Ygor Lemos
                Reviewer:
                Hieu Pham
              • Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                    Git Integration