Search code examples
androiddelphiversiondelphi-xe7

How to get app versionname for android with delphi XE7?


I found one answer for delphi XE5 here but it doesn't work with XE7.

For instance is SharedActivity unknown. Anyone who know how to do this?

Thanks.


Solution

  • You need to change the uses a little from the answer that you link to. I think that instead of:

    uses
      Androidapi.JNI.JavaTypes,
      FMX.Helpers.Android,
      Androidapi.JNI.GraphicsContentViewText;
    

    the code will work with:

    uses
      Androidapi.JNI.JavaTypes,
      Androidapi.Helpers, 
      Androidapi.JNI.App,
      Androidapi.JNI.GraphicsContentViewText;