Our users will be using many different managed package versions. As users can be using versions which don't have the latest features, I need to know which package is being used by a user who will log in to Salesforce from an external application and invoke Apex web services.
I've been looking for a way to access this number from within Apex but I can't find anything.
This could also be accessed from the external application, and I found the following documentation which mentions the PackageVersion and PackageVersionHeader API classes. However, I don't know if this respects the logged-in user or simply lists all packages being used in SFDC, and I don't have access to the external application to check.
Does anyone have any idea how I can do this?