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.util.Log;

public class Main {
    public static BluetoothAdapter myDevice;

    public static String getPhoneName() {
        myDevice = BluetoothAdapter.getDefaultAdapter();
        String deviceName = myDevice.getName();
        Log.i("DEVICE_NAME : ", deviceName);
        return deviceName;
    }
}