Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothManager;
import android.content.Context;

public class Main {
    public static BluetoothAdapter mBluetoothAdapter;

    public static BluetoothAdapter getBluetoothAdapter(Context ctx) {
        final BluetoothManager bluetoothManager = (BluetoothManager) ctx
                .getSystemService(Context.BLUETOOTH_SERVICE);
        mBluetoothAdapter = bluetoothManager.getAdapter();
        return mBluetoothAdapter;
    }
}