Skip to content

Instantly share code, notes, and snippets.

@jbaginski
Created August 8, 2013 07:44
Show Gist options
  • Save jbaginski/6182453 to your computer and use it in GitHub Desktop.
Save jbaginski/6182453 to your computer and use it in GitHub Desktop.
android build details
package org.example;
import android.app.Activity;
import android.content.pm.PackageManager;
import android.content.pm.PackageInfo;
class PackageManagerInfo extends Activity {
public void onCreate() {
super.onCreate();
PackageManager manager = this.getPackageManager();
PackageInfo info = manager.getPackageInfo(this.getPackageName(), 0);
System.out.println("PackageName = " + info.packageName);
System.out.println("VersionCode = " + info.versionCode);
System.out.println("VersionName = " + info.versionName);
System.out.println("Permissions = " + info.permissions);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment