Acessing Data in AndroidManifest

by Damien » Mon, 13 Apr 2009 12:12:40 GMT

Sponsored Links
 I'm trying to access "android:versionName" in another XML resource
file. I tried to use @android/versionName and @android:versionName,
but neither work. Can anyone help me out?


Acessing Data in AndroidManifest

by Ralf » Mon, 13 Apr 2009 12:57:23 GMT

 Afaik, the versionName attribute is not a string you can reference
from other resources.

However you can programatically retrieve it like this:
  PackageManager pm = getPackageManager();
  PackageInfo pi = pm.getPackageInfo(getPackageName(), 0);
  mVersion = pi.versionName;

For example I do that to dynamically inject it in my html about page.


Sponsored Links

Other Threads

1. Has anyone get App Inventor accounts?

Has anyone get a App Inventor account? I'd like to get an account to
develop some programs, but now what can I do is just waiting...


2. Accessing attributes of child views

I am quite new to Java, let alone Android. I am stuck with a problem
that I encountered while instrumenting (using the instrumentation
framework of android) the code of a Android project. I have a ListView
and using the getTouchables() API I have store the view in a
ArrayList. When in debug session, I saw that each view has children
(mChildren) when expanded I could see that there is a "ImageView" and
"TextView" present. when the "TextView" is expanded, I could access
the mText variable which contains the text value I am looking for. In
brief, the value I am looking for, when looking at the "variables"
window of the debug perspective of Eclipse, is present at "myview-

Here "myview" is the name of the object of View class.

how do I access/ read the content of the "value" variable?

Please let me know if you need any info in this regard?

Thank you


3. Regarding Intents

4. Unpublished app still can be purchased?

5. WebView and Android 1.5

6. WtL: case seidio innocase Droid/milestone

7. Cannot find "gen" folder... it's right there!