| @@ -5,7 +5,6 @@ | |||
| [key注册地址](http://sdk.aicare.net.cn) | |||
| [English documentation](README.md) | |||
| @@ -8,7 +8,7 @@ android { | |||
| minSdkVersion 19 | |||
| targetSdkVersion 29 | |||
| versionCode 2 | |||
| versionName "1.2.9" | |||
| versionName "1.3.0" | |||
| testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | |||
| } | |||
| buildTypes { | |||
| @@ -31,6 +31,6 @@ dependencies { | |||
| implementation 'androidx.appcompat:appcompat:1.1.0' | |||
| implementation 'androidx.constraintlayout:constraintlayout:1.1.3' | |||
| testImplementation 'junit:junit:4.12' | |||
| implementation 'com.github.elinkthings:AILinkSDKRepositoryAndroid:1.2.9' | |||
| implementation 'com.github.elinkthings:AILinkSDKParsingLibraryAndroid:1.2.9' | |||
| implementation 'com.github.elinkthings:AILinkSDKRepositoryAndroid:1.4.5' | |||
| implementation 'com.github.elinkthings:AILinkSDKParsingLibraryAndroid:1.3.0' | |||
| } | |||
| @@ -49,7 +49,7 @@ public abstract class BleBaseActivity extends AppCompatActivity { | |||
| */ | |||
| protected void startScanBle(long timeOut){ | |||
| if (mBluetoothService!=null){ | |||
| mBluetoothService.scanLeDevice(timeOut, BleConfig.SERVER_UUID); | |||
| mBluetoothService.scanLeDevice(timeOut, BleConfig.UUID_SERVER); | |||
| } | |||
| } | |||
| @@ -29,7 +29,7 @@ public class MainActivity extends AppCompatActivity { | |||
| @Override | |||
| protected void onCreate(Bundle savedInstanceState) { | |||
| super.onCreate(savedInstanceState); | |||
| AILinkSDK.getInstance().init(this,"",""); | |||
| AILinkSDK.getInstance().init(this,"28307eb356debd69","00deaab8ea81acba686e725a2b"); | |||
| setContentView(R.layout.activity_main); | |||
| BleLog.init("", "", BuildConfig.DEBUG); | |||
| String version=getString(R.string.version)+":"+BuildConfig.VERSION_NAME; | |||
| @@ -106,8 +106,8 @@ public class MainActivity extends AppCompatActivity { | |||
| */ | |||
| private void initPermissions() { | |||
| if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { | |||
| ActivityCompat.requestPermissions(this, | |||
| new String[]{Manifest.permission.ACCESS_COARSE_LOCATION}, 1); | |||
| // ActivityCompat.requestPermissions(this,new String[]{Manifest.permission.ACCESS_COARSE_LOCATION}, 1); | |||
| ActivityCompat.requestPermissions(this,new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 1); | |||
| } | |||
| } | |||
| @@ -111,7 +111,7 @@ public class ShowBleActivity extends AppCompatActivity implements OnCallbackBle, | |||
| public void onClick(View v) { | |||
| if (mBluetoothService != null) { | |||
| BleLog.i(TAG, "搜索设备"); | |||
| mBluetoothService.scanLeDevice(0, BleConfig.SERVER_UUID); | |||
| mBluetoothService.scanLeDevice(0, BleConfig.UUID_SERVER); | |||
| mList.clear(); | |||
| listAdapter.notifyDataSetChanged(); | |||
| } | |||