package ab.issue.utils;

import android.content.Context;
import android.content.pm.PackageManager;

/**
 * Created by ankitmac on 26/01/16.
 */
public final class PackageUtils {

    public static String getVersion(Context context) {
        try {
            return context.getPackageManager().getPackageInfo(context.getPackageName(), 0 /* flags */).versionName;
        } catch (PackageManager.NameNotFoundException e) {
            return null;
        }
    }
}
