Tuesday 24 July 2018

Output android versionname as string

I have my versionCode and versionName set in my manifest.xml



android:versionCode="2"
android:versionName="Alpha 1.2"


But how do I output this as a string so the user can see what version of the app they have?

In my "about" fragment I attempted to use:



android:text="?android:attr/versionName"


but this didnt seem to work. It literally put "?android:attr/versionName" as the output string.

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...