@Nullable
    public static String getPackageInstaller(@NonNull final Context context) {
        final PackageManager packageManager = context.getPackageManager();
        return packageManager.getInstallerPackageName(context.getPackageName());
    }
@ Nullable public static String getPackageInstaller ( @ NonNull final Context context ) { final PackageManager packageManager = context . getPackageManager ( ) ; return packageManager . getInstallerPackageName ( context . getPackageName ( ) ) ; }
Returns the package name of the application installer.

@param context The instance of {@link android.content.Context}.
@return The package name of the application installer.