获取软件自身包名、图标、版本

javax(pm,activity,"android.content.ContextWrapper","getPackageManager")

javax(pknm,activity,"android.content.ContextWrapper","getPackageName")
//本应用包名
syso(pknm)

javax(ver,pm,"android.content.pm.PackageManager","getPackageInfo","String",pknm,"int",0)
javags(版本,ver,"android.content.pm.PackageInfo.versionName")
//本包名的版本
syso(版本)

javax(icon,pm,"android.content.pm.PackageManager","getApplicationInfo","String",pknm,"int",0)
javax(图标,icon,"android.content.pm.PackageItemInfo","loadIcon","android.content.pm.PackageManager",pm)
//本应用图标
syso(图标)

javags(pkg,ver,"android.content.pm.PackageInfo.applicationInfo")
javax(应用名称,pkg,"android.content.pm.PackageItemInfo","loadLabel","android.content.pm.PackageManager",pm)
//本应用名
syso(应用名称)
发表评论 / Comment

用心评论~