Example usage for android.content Context getPackageManager

List of usage examples for android.content Context getPackageManager

Introduction

In this page you can find the example usage for android.content Context getPackageManager.

Prototype

public abstract PackageManager getPackageManager();

Source Link

Document

Return PackageManager instance to find global package information.

Usage

From source file:Main.java

public static boolean isCatlogFreeInstalled(Context context) {
    return context.getPackageManager().checkSignatures(context.getPackageName(), "com.nolanlawson.logcat") >= 0;
}

From source file:Main.java

public static boolean checkBLE(Context context) {
    return context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE);
}

From source file:Main.java

public static boolean hasTelephonyFeature(Context context) {
    return context.getPackageManager().hasSystemFeature("android.hardware.telephony");
}

From source file:Main.java

public static boolean hasCamera(Context context) {
    return context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA);
}

From source file:Main.java

public static boolean hasCameraHardware(Context context) {
    return context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA);
}

From source file:Main.java

public static boolean isBLESupported(Context context) {
    return context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE);
}

From source file:Main.java

public static boolean isCameraSupported(Context context) {
    return context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA);
}

From source file:Main.java

public static boolean isCallEnabled(Context context) {
    return context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_TELEPHONY);
}

From source file:Main.java

public static boolean isFreeVersionInstalled(Context context) {
    return context.getPackageManager().checkSignatures(context.getPackageName(),
            "com.nolanlawson.keepscore") >= 0;
}

From source file:Main.java

public static boolean deviceHasCamera(Context context) {
    return context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA);
}