I need to write some util class by myself and I need the packagename of android app. While I found the packageManager which only can be used in Activity and so on that has c
you can get the package name of installed app:
ArrayList res = new ArrayList(); PackageManager pm = getApplicationContext().getPackageManager(); List packs = pm.getInstalledPackages(0);
and if you want to find the package name of your app:
context.getPackageName();