I have a requirement where I want to develop a hybrid application and list the Bluetooth devices, scan and connect, share files etc.
So I want to add BluetoothAdapter
mAdapter value into extras and pass it into onActivity result. Like enableIntent.putExtra("", mAdapter);
and use it in onActivityResult
by getExtra(...)
. Is there a way to do so??..
if (!mBluetoothAdapter.isEnabled()) {
Intent enableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
((Activity)context).startActivityForResult(enableIntent, RequestCodes.BLUETOOTH_ENABLE_CODE);
}