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.
R/




--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. Sold - WTS: Nexus One Second

Update, udah sold
Terima kasih jalum-nya

- N1 User -

-----Original Message-----
From: "Chippy Ahwil" <chippy.dr...@gmail.com>
Date: Sat, 1 May 2010 07:09:46 
To: <id-android@googlegroups.com>
Subject: WTS: Nexus One Second

Rekan2,
Berhubung yg book tdk ada kabar mau coba dijual santai aja. 

Mau numpang menawarkan Nexus One second ex pemakaian sendiri. 

Mungkin ada yg mau dijadikan wireless tether utk iPad. 

Kondisi:
- mulus pembelian 3 bulan lalu. 
- rooted, skrg gunakan cm-5.0.6-stable
- asesoris blm ada yg dipakai (lengkap)

Ditawarkan di harga 5,6 (nego) 

Bagi yg minat silakan japri ke:
chippy.ah...@gmail.com
Telp/SMS: 081410149888

Terima kasih. 

- N1 User -

-- 
"Indonesian Android Community [id-android]" 

2. Developing a C++ static library for use with Java on the Android

I have an existing C++ library that I want to compile into a static
library, and call commands from it with Java on the Android platform.
I am brand new to Android development, and just need to figure out how
to set the Java interface up so my C++ lib works on the Android.
Where do I start?

-- 

3. Fwd: <Wta>about 3G....

4. Activity and Views relelation ship

5. Change the playback rate of a track in real time

6. Not calling OnStop when an incoming call is received

7. Android by Selular