Professional Documents
Culture Documents
AIM:-Write A Program That Identifies The Bluetooth Devices in The Wireless Range
AIM:-Write A Program That Identifies The Bluetooth Devices in The Wireless Range
AIM:-Write A Program That Identifies The Bluetooth Devices in The Wireless Range
AIM:- Write a program that identifies the bluetooth devices in the wireless range.
DeviceListAdapter.java
package com.example.user.bluetooth_communication;
import android.bluetooth.BluetoothDevice;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;
import java.util.ArrayList;
devices){
super(context, tvResourceId,devices);
this.mDevices = devices;
mLayoutInflater = (LayoutInflater)
context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
mViewResourceId = tvResourceId;
if (device != null) {
convertView.findViewById(R.id.tvDeviceName);
convertView.findViewById(R.id.tvDeviceAddress);
if (deviceName != null) {
deviceName.setText(device.getName());
if (deviceAdress != null) {
deviceAdress.setText(device.getAddress());
return convertView;