Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

import android.annotation.TargetApi;

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

public class Main {
    /**
     * Determine weather the device has BLE.
     *
     * @param context  where from you determine if the device has BLE
     * @return True if the device has BLE.
     */
    @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)
    public static boolean hasBluetoothLE(final Context context) {
        return (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE));
    }
}