Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.bluetooth.BluetoothAdapter;

public class Main {
    public static boolean isBluetoothEnabled() {
        return isBluetoothEnabled(getAdapter());
    }

    public static boolean isBluetoothEnabled(BluetoothAdapter adapter) {
        return adapter != null && adapter.isEnabled();
    }

    public static BluetoothAdapter getAdapter() {
        return BluetoothAdapter.getDefaultAdapter();
    }
}