Skip to content

Commit

Permalink
update lib
Browse files Browse the repository at this point in the history
  • Loading branch information
wumeng1 authored and wumeng1 committed Jul 1, 2021
1 parent 077b9ab commit 7ca4dc2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/src/main/java/com/mirkowu/mvm/ble/BleActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class BleActivity : BaseActivity<EmptyMediator>() {
}
mAdapter.setOnItemClickListener { view, item, position ->
val device = mAdapter.getItem(position);
// bleManager.connect(device.address, true)
bleManager.connect(device.address, true)
};

bleManager = BLEManager.getInstance()
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/com/mirkowu/mvm/ble/DeviceAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;

import com.mirkowu.lib_base.adapter.BaseAdapter;
import com.mirkowu.lib_widget.adapter.BaseRVAdapter;
import com.mirkowu.mvm.R;

import org.jetbrains.annotations.NotNull;

public class DeviceAdapter extends BaseAdapter<BluetoothDevice, DeviceAdapter.ViewHolder> {
public class DeviceAdapter extends BaseRVAdapter<BluetoothDevice, DeviceAdapter.ViewHolder> {

@Override
public void onBindHolder(@NonNull @NotNull ViewHolder holder, BluetoothDevice item, int position) {
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/java/com/mirkowu/mvm/ble/SearchBleActivity.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.mirkowu.mvm.ble

import android.bluetooth.BluetoothAdapter.LeScanCallback
import android.bluetooth.BluetoothDevice
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
Expand All @@ -17,6 +16,7 @@ import com.mirkowu.lib_util.utilcode.util.ConvertUtils
import com.mirkowu.lib_util.utilcode.util.ToastUtils
import com.mirkowu.mvm.R
import com.mirkowu.mvm.base.BaseActivity
import com.mirkowu.mvm.databinding.ActivitySearchBleBinding

class SearchBleActivity : BaseActivity<EmptyMediator>() {

Expand Down Expand Up @@ -64,8 +64,8 @@ class SearchBleActivity : BaseActivity<EmptyMediator>() {
rvSearch.setAdapter(mAdapter);
mAdapter.setOnItemClickListener { view, item, position ->
val device = mAdapter.getItem(position);
// client.connect(device.getAddress(), true);
// client.startMonitor(getContext(), bleReceiver, BLEClient.makeGattUpdateIntentFilter());
client.connect(device.getAddress(), true);
client.startMonitor(getContext(), bleReceiver, BLEClient.makeGattUpdateIntentFilter());
};
client = BLEClient.getInstance()
startLeScan();
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ ext {
targetSdkVersion = 29
compileSdkVersion = 29

mvm_version = '1.0.15'
mvm_version = '1.0.19'
appcompat_version = '1.3.0'
core_ktx_version = '1.5.0'
lifecycle_version = '2.3.1'
Expand Down

0 comments on commit 7ca4dc2

Please sign in to comment.