Back to project page AnAudioPlayer.
The source code is released under:
MIT License
If you think the Android project AnAudioPlayer listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package jp.gr.java_conf.neko_daisuki.anaudioplayer; /*from ww w . j a v a 2 s.com*/ import android.app.Activity; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.os.Bundle; import android.widget.TextView; import jp.gr.java_conf.neko_daisuki.android.util.ContextUtil; public class AboutActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.about); showVersion(); } private void showVersion() { PackageInfo pi; try { pi = ContextUtil.getPackageInfo(this); } catch (PackageManager.NameNotFoundException e) { String msg = "Cannot fetch the package information"; ContextUtil.showException(this, msg, e); return; } TextView view = (TextView)findViewById(R.id.version); view.setText(pi.versionName); } } // vim: tabstop=4 shiftwidth=4 expandtab softtabstop=4