diff --git a/CHANGELOG.md b/CHANGELOG.md index c320c3e..4a90ffb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,17 @@ ## Modified - Update kotlin version -# V1.4.0 ## Fixed - Fixed on click listener in payment button +## Added +- Coroutines have been implemented in the content resolvers and other layers, such as use cases and the implementations of the features available in the SDK. +- Used Smart App content provider to update hardware buttons state +- Implemented the feature that allows to obtain the SDK and device information. +- Backward compatibility in callbacks when building the paymentFlow deeplink in the SDK. +- Implement generic result to handler sdk answer +- Error handling when inserting a non-numeric amount format. + # v1.3.0 ## Added - Launch payment flow with payment method like parameter diff --git a/app/build.gradle b/app/build.gradle index 4602cea..3822410 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -51,7 +51,7 @@ android { dependencies { - implementation files("libs/nativesdk-1.3.0.aar") + implementation files("libs/nativesdk-2.0.0.aar") // AndroidX implementation "androidx.constraintlayout:constraintlayout:$constraintLayoutVersion" diff --git a/app/libs/nativesdk-1.3.0.aar b/app/libs/nativesdk-1.3.0.aar deleted file mode 100644 index b2e5249..0000000 Binary files a/app/libs/nativesdk-1.3.0.aar and /dev/null differ diff --git a/app/libs/nativesdk-2.0.0.aar b/app/libs/nativesdk-2.0.0.aar new file mode 100644 index 0000000..7d1d74c Binary files /dev/null and b/app/libs/nativesdk-2.0.0.aar differ diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index f91fd1c..b06947e 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,9 +1,7 @@ - - - + + @@ -62,4 +63,6 @@ android:exported="false" /> + + diff --git a/app/src/main/java/com/mercadolibre/android/point_mainapp_demo/app/view/bluetooth/BluetoothTestActivity.kt b/app/src/main/java/com/mercadolibre/android/point_mainapp_demo/app/view/bluetooth/BluetoothTestActivity.kt index fd3f239..4fb3ad0 100644 --- a/app/src/main/java/com/mercadolibre/android/point_mainapp_demo/app/view/bluetooth/BluetoothTestActivity.kt +++ b/app/src/main/java/com/mercadolibre/android/point_mainapp_demo/app/view/bluetooth/BluetoothTestActivity.kt @@ -18,9 +18,7 @@ import com.mercadolibre.android.point_mainapp_demo.app.view.bluetooth.adapter.Bl import com.mercadolibre.android.point_mainapp_demo.app.view.bluetooth.contracts.BluetoothSettingsEvents.* import com.mercadolibre.android.point_mainapp_demo.app.view.bluetooth.viewmodels.BluetoothSettingsViewModel -/** - * test activity bluetooth. - * */ +/** test activity bluetooth. */ class BluetoothTestActivity : AppCompatActivity() { private val binding: PointMainappDemoAppActivityBluetoothTestBinding by lazy { @@ -98,6 +96,7 @@ class BluetoothTestActivity : AppCompatActivity() { binding.groupDiscoveryDevices.visible() it.addItemDevice(events.devices) } + is DiscoveryDevicesUpdate -> adapterAvailableDevices.updateItemDevice(events.devices) DiscoveryStarted -> binding.progressbarDiscoveryStarted.visible() is DiscoveryPairDevicesResult -> pairDevicesResult(events.devicesList) @@ -106,6 +105,7 @@ class BluetoothTestActivity : AppCompatActivity() { is PairingDevicesStatus -> handlerParingResult(events.pair) Init -> Unit is ConnectDevicesResult -> adapterPairDevices.updateItemDevice(events.connectDevices) + is Error -> events.error.message?.let { message -> showMessage(message) } } } } @@ -126,6 +126,7 @@ class BluetoothTestActivity : AppCompatActivity() { } ?: adapterAvailableDevices.addItemDevice(bluetoothDevice) Toast.makeText(this, "devices forget", Toast.LENGTH_SHORT).show() } + BluetoothBondState.BONDING -> devicesFoundInAvailableList?.let { adapterAvailableDevices.updateItemDevice(it) } @@ -140,7 +141,6 @@ class BluetoothTestActivity : AppCompatActivity() { groupDiscoveryDevices.isVisible = adapterAvailableDevices.currentList.isNotEmpty() progressbarDiscoveryStarted.gone() } - } private fun pairDevicesResult(list: List) { @@ -170,4 +170,8 @@ class BluetoothTestActivity : AppCompatActivity() { } } } + + private fun showMessage(message: String) { + Toast.makeText(this@BluetoothTestActivity, message, Toast.LENGTH_SHORT).show() + } } diff --git a/app/src/main/java/com/mercadolibre/android/point_mainapp_demo/app/view/bluetooth/contracts/BluetoothSettingsEvents.kt b/app/src/main/java/com/mercadolibre/android/point_mainapp_demo/app/view/bluetooth/contracts/BluetoothSettingsEvents.kt index 85e0ed1..5b6e975 100644 --- a/app/src/main/java/com/mercadolibre/android/point_mainapp_demo/app/view/bluetooth/contracts/BluetoothSettingsEvents.kt +++ b/app/src/main/java/com/mercadolibre/android/point_mainapp_demo/app/view/bluetooth/contracts/BluetoothSettingsEvents.kt @@ -17,4 +17,6 @@ internal sealed class BluetoothSettingsEvents { class DiscoveryDevicesUpdate(val devices: BluetoothDeviceModel) : BluetoothSettingsEvents() class PairingDevicesStatus(val pair: Pair) : BluetoothSettingsEvents() class ConnectDevicesResult(val connectDevices: BluetoothDeviceModel) : BluetoothSettingsEvents() + + class Error(val error: Exception) : BluetoothSettingsEvents() } diff --git a/app/src/main/java/com/mercadolibre/android/point_mainapp_demo/app/view/bluetooth/contracts/PrinterEvents.kt b/app/src/main/java/com/mercadolibre/android/point_mainapp_demo/app/view/bluetooth/contracts/PrinterEvents.kt index 573bc05..b42d4c5 100644 --- a/app/src/main/java/com/mercadolibre/android/point_mainapp_demo/app/view/bluetooth/contracts/PrinterEvents.kt +++ b/app/src/main/java/com/mercadolibre/android/point_mainapp_demo/app/view/bluetooth/contracts/PrinterEvents.kt @@ -7,4 +7,6 @@ sealed class PrinterEvents { class OutputResult(val resultMessage: String) : PrinterEvents() class LaunchPrinterSelector(val printerList: List) : PrinterEvents() object DataEmpty : PrinterEvents() + + class Error(val error: Exception) : PrinterEvents() } diff --git a/app/src/main/java/com/mercadolibre/android/point_mainapp_demo/app/view/bluetooth/printer/PrinterTestActivity.kt b/app/src/main/java/com/mercadolibre/android/point_mainapp_demo/app/view/bluetooth/printer/PrinterTestActivity.kt index d92d4ce..703e047 100644 --- a/app/src/main/java/com/mercadolibre/android/point_mainapp_demo/app/view/bluetooth/printer/PrinterTestActivity.kt +++ b/app/src/main/java/com/mercadolibre/android/point_mainapp_demo/app/view/bluetooth/printer/PrinterTestActivity.kt @@ -55,8 +55,10 @@ class PrinterTestActivity : AppCompatActivity(), PrinterSelectorCallback { is PrinterEvents.IsLoading -> binding.progressIndicator.isVisible = event.isVisible is PrinterEvents.LaunchPrinterSelector -> PrinterSelectorDialog.newInstance(event.printerList) .show(supportFragmentManager, PrinterSelectorDialog::class.simpleName) + is PrinterEvents.OutputResult -> makeSnackBar(event.resultMessage) - PrinterEvents.DataEmpty -> makeSnackBar(getString(R.string.point_mainapp_demo_app_error_msg_data_empty)) + is PrinterEvents.DataEmpty -> makeSnackBar(getString(R.string.point_mainapp_demo_app_error_msg_data_empty)) + is PrinterEvents.Error -> event.error.message?.let { message -> makeSnackBar(message) } } } } diff --git a/app/src/main/java/com/mercadolibre/android/point_mainapp_demo/app/view/bluetooth/viewmodels/BluetoothPrinterViewModel.kt b/app/src/main/java/com/mercadolibre/android/point_mainapp_demo/app/view/bluetooth/viewmodels/BluetoothPrinterViewModel.kt index ba90f8c..6a1d068 100644 --- a/app/src/main/java/com/mercadolibre/android/point_mainapp_demo/app/view/bluetooth/viewmodels/BluetoothPrinterViewModel.kt +++ b/app/src/main/java/com/mercadolibre/android/point_mainapp_demo/app/view/bluetooth/viewmodels/BluetoothPrinterViewModel.kt @@ -5,6 +5,9 @@ import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope import com.mercadolibre.android.point_integration_sdk.nativesdk.MPManager +import com.mercadolibre.android.point_integration_sdk.nativesdk.bluetoothclient.provider.contracts.states.BluetoothPrinterResult +import com.mercadolibre.android.point_integration_sdk.nativesdk.message.utils.doIfError +import com.mercadolibre.android.point_integration_sdk.nativesdk.message.utils.doIfSuccess import com.mercadolibre.android.point_mainapp_demo.app.view.bluetooth.contracts.PrinterEvents import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch @@ -26,29 +29,40 @@ class BluetoothPrinterViewModel : ViewModel() { _printerEventLiveDataLiveData.value = PrinterEvents.IsLoading(true) viewModelScope.launch(Dispatchers.IO) { addressDevices?.let { address -> - MPManager.bluetooth.printer.makePrint(stringToPrint, address) { results -> - resultBehavior(results) + MPManager.bluetooth.printer.makePrint(stringToPrint, address) { response -> + response + .doIfSuccess { result -> + resultBehavior(result) + }.doIfError { exception -> + _printerEventLiveDataLiveData.value = PrinterEvents.Error(exception) + } } - } ?: MPManager.bluetooth.printer.makePrint(stringToPrint) { results -> - resultBehavior(results) + } ?: MPManager.bluetooth.printer.makePrint(stringToPrint) { response -> + response + .doIfSuccess { result -> + resultBehavior(result) + }.doIfError { exception -> + _printerEventLiveDataLiveData.value = PrinterEvents.Error(exception) + } } } } - private fun resultBehavior(result: String) { + private fun resultBehavior(makePrintResult: BluetoothPrinterResult) { viewModelScope.launch(Dispatchers.IO) { _printerEventLiveDataLiveData.postValue(PrinterEvents.IsLoading(false)) - if (result == NEED_SELECTION_DEVICE) { - MPManager.bluetooth.discover.getPairPrinterDevices { listPrinter -> - _printerEventLiveDataLiveData.postValue(PrinterEvents.LaunchPrinterSelector(listPrinter)) + if (makePrintResult == BluetoothPrinterResult.NEED_SELECTION_DEVICE) { + MPManager.bluetooth.discover.getPairPrinterDevices { response -> + response + .doIfSuccess { listPrinter -> + _printerEventLiveDataLiveData.postValue(PrinterEvents.LaunchPrinterSelector(listPrinter)) + }.doIfError { exception -> + _printerEventLiveDataLiveData.value = PrinterEvents.Error(exception) + } } } else { - _printerEventLiveDataLiveData.postValue(PrinterEvents.OutputResult(result)) + _printerEventLiveDataLiveData.postValue(PrinterEvents.OutputResult(makePrintResult.name)) } } } - - companion object { - const val NEED_SELECTION_DEVICE = "NEED_SELECTION_DEVICE" - } } diff --git a/app/src/main/java/com/mercadolibre/android/point_mainapp_demo/app/view/bluetooth/viewmodels/BluetoothSettingsViewModel.kt b/app/src/main/java/com/mercadolibre/android/point_mainapp_demo/app/view/bluetooth/viewmodels/BluetoothSettingsViewModel.kt index 80796c0..399e128 100644 --- a/app/src/main/java/com/mercadolibre/android/point_mainapp_demo/app/view/bluetooth/viewmodels/BluetoothSettingsViewModel.kt +++ b/app/src/main/java/com/mercadolibre/android/point_mainapp_demo/app/view/bluetooth/viewmodels/BluetoothSettingsViewModel.kt @@ -7,6 +7,8 @@ import androidx.lifecycle.viewModelScope import com.mercadolibre.android.point_integration_sdk.nativesdk.MPManager import com.mercadolibre.android.point_integration_sdk.nativesdk.bluetoothclient.provider.contracts.states.DiscoveryEventsResult import com.mercadolibre.android.point_integration_sdk.nativesdk.bluetoothclient.provider.entities.BluetoothDeviceModel +import com.mercadolibre.android.point_integration_sdk.nativesdk.message.utils.doIfError +import com.mercadolibre.android.point_integration_sdk.nativesdk.message.utils.doIfSuccess import com.mercadolibre.android.point_mainapp_demo.app.view.bluetooth.contracts.BluetoothSettingsEvents import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.flow.MutableStateFlow @@ -19,32 +21,64 @@ internal class BluetoothSettingsViewModel : ViewModel() { val bluetoothSettingLiveData = _bluetoothSettingLiveData.asStateFlow() fun registerConnectObserver() { - MPManager.bluetooth.connectObserver.registerObserver { _, bluetoothDeviceModel -> - _bluetoothSettingLiveData.value = - BluetoothSettingsEvents.ConnectDevicesResult(bluetoothDeviceModel) + MPManager.bluetooth.connectObserver.registerObserver { result -> + result + .doIfSuccess { pair -> + val bluetoothDeviceModel = pair.first + _bluetoothSettingLiveData.value = BluetoothSettingsEvents.ConnectDevicesResult(bluetoothDeviceModel) + }.doIfError { exception -> + _bluetoothSettingLiveData.value = BluetoothSettingsEvents.Error(exception) + } } } fun getCurrentStateBluetooth() { - MPManager.bluetooth.ignitor.getCurrentState { state -> - _bluetoothSettingLiveData.value = BluetoothSettingsEvents.IgnitorCurrentState(state) + MPManager.bluetooth.ignitor.getCurrentState { response -> + response + .doIfSuccess { result -> + _bluetoothSettingLiveData.value = BluetoothSettingsEvents.IgnitorCurrentState(result) + }.doIfError { exception -> + _bluetoothSettingLiveData.value = BluetoothSettingsEvents.Error(exception) + } } } fun ignitorBluetooth(ignitor: Boolean) { MPManager.bluetooth.ignitor.run { if (ignitor) { - turnOn { result -> _bluetoothSettingLiveData.value = BluetoothSettingsEvents.IgnitorLaunchResult(result) } + turnOn { response -> + response + .doIfSuccess { result -> + _bluetoothSettingLiveData.value = BluetoothSettingsEvents.IgnitorLaunchResult(result) + } + .doIfError { exception -> + _bluetoothSettingLiveData.value = BluetoothSettingsEvents.Error(exception) + } + } } else { - turnOff { result -> _bluetoothSettingLiveData.value = BluetoothSettingsEvents.IgnitorLaunchResult(result) } + turnOff { response -> + response + .doIfSuccess { result -> + _bluetoothSettingLiveData.value = BluetoothSettingsEvents.IgnitorLaunchResult(result) + } + .doIfError { exception -> + _bluetoothSettingLiveData.value = BluetoothSettingsEvents.Error(exception) + } + } } } } fun getPairDevices() { viewModelScope.launch(Dispatchers.IO) { - MPManager.bluetooth.discover.getPairDevices { result -> - _bluetoothSettingLiveData.value = BluetoothSettingsEvents.DiscoveryPairDevicesResult(result) + MPManager.bluetooth.discover.getPairDevices { response -> + response + .doIfSuccess { result -> + _bluetoothSettingLiveData.value = BluetoothSettingsEvents.DiscoveryPairDevicesResult(result) + } + .doIfError { exception -> + _bluetoothSettingLiveData.value = BluetoothSettingsEvents.Error(exception) + } } } } @@ -56,6 +90,10 @@ internal class BluetoothSettingsViewModel : ViewModel() { _bluetoothSettingLiveData.value = BluetoothSettingsEvents.DiscoveryStarted } + override fun internalError(error: Exception) { + _bluetoothSettingLiveData.value = BluetoothSettingsEvents.Error(error) + } + override fun discoveryEnded() { _bluetoothSettingLiveData.value = BluetoothSettingsEvents.DiscoveryEnded } @@ -76,14 +114,25 @@ internal class BluetoothSettingsViewModel : ViewModel() { Log.i(TAG, "pairingDevices: devices address --> $address, needPair --> $needPair") viewModelScope.launch(Dispatchers.IO) { if (needPair) { - MPManager.bluetooth.paring.pairDevices(address) { pairingStatus -> - Log.i(TAG, "pairDevices: callback response ${pairingStatus.first}") - _bluetoothSettingLiveData.value = BluetoothSettingsEvents.PairingDevicesStatus(pairingStatus) + MPManager.bluetooth.paring.pairDevices(address) { response -> + response + .doIfSuccess { resultPair -> + Log.i(TAG, "pairDevices: callback response ${resultPair.first}") + _bluetoothSettingLiveData.value = BluetoothSettingsEvents.PairingDevicesStatus(resultPair) + } + .doIfError { exception -> + _bluetoothSettingLiveData.value = BluetoothSettingsEvents.Error(exception) + } } } else { - MPManager.bluetooth.paring.unPairDevices(address) { pairingStatus -> - Log.i(TAG, "unPairDevices: callback response ${pairingStatus.first}") - _bluetoothSettingLiveData.value = BluetoothSettingsEvents.PairingDevicesStatus(pairingStatus) + MPManager.bluetooth.paring.unPairDevices(address) { response -> + response + .doIfSuccess { resultPair -> + Log.i(TAG, "unPairDevices: callback response ${resultPair.first}") + _bluetoothSettingLiveData.value = BluetoothSettingsEvents.PairingDevicesStatus(resultPair) + }.doIfError { exception -> + _bluetoothSettingLiveData.value = BluetoothSettingsEvents.Error(exception) + } } } } diff --git a/app/src/main/java/com/mercadolibre/android/point_mainapp_demo/app/view/home/HomeActivity.kt b/app/src/main/java/com/mercadolibre/android/point_mainapp_demo/app/view/home/HomeActivity.kt index 5886f54..8a2efcc 100644 --- a/app/src/main/java/com/mercadolibre/android/point_mainapp_demo/app/view/home/HomeActivity.kt +++ b/app/src/main/java/com/mercadolibre/android/point_mainapp_demo/app/view/home/HomeActivity.kt @@ -8,6 +8,7 @@ import com.mercadolibre.android.point_mainapp_demo.app.databinding.PointMainappD import com.mercadolibre.android.point_mainapp_demo.app.view.bluetooth.BluetoothTestActivity import com.mercadolibre.android.point_mainapp_demo.app.view.bluetooth.printer.PrinterTestActivity import com.mercadolibre.android.point_mainapp_demo.app.view.camera.CameraScannerActivity +import com.mercadolibre.android.point_mainapp_demo.app.view.info.SmartInfoActivity import com.mercadolibre.android.point_mainapp_demo.app.view.payment.launcher.PaymentLauncherActivity import com.mercadolibre.android.point_mainapp_demo.app.view.printer.PrinterBitmapActivity import com.mercadolibre.android.point_mainapp_demo.app.view.refunds.RefundsActivity @@ -28,6 +29,7 @@ class HomeActivity : AppCompatActivity() { configGoToPrinterTest() onPrinterBitmap() configGoToCameraScanner() + configGoToSmartInfo() } private fun configGoToRefundsUI() { @@ -72,7 +74,13 @@ class HomeActivity : AppCompatActivity() { } } - private fun launchActivity(destination: Class) { + private fun configGoToSmartInfo() { + binding?.pointMainappDemoAppGoToInfo?.setOnClickListener { + launchActivity(SmartInfoActivity::class.java) + } + } + + private fun launchActivity(destination: Class) { Intent(this, destination).run { startActivity(this) } diff --git a/app/src/main/java/com/mercadolibre/android/point_mainapp_demo/app/view/info/SmartInfoActivity.kt b/app/src/main/java/com/mercadolibre/android/point_mainapp_demo/app/view/info/SmartInfoActivity.kt new file mode 100644 index 0000000..581b8c5 --- /dev/null +++ b/app/src/main/java/com/mercadolibre/android/point_mainapp_demo/app/view/info/SmartInfoActivity.kt @@ -0,0 +1,45 @@ +package com.mercadolibre.android.point_mainapp_demo.app.view.info + +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import com.mercadolibre.android.point_integration_sdk.nativesdk.MPManager +import com.mercadolibre.android.point_mainapp_demo.app.R +import com.mercadolibre.android.point_mainapp_demo.app.databinding.PointMainappDemoAppActivitySmartInfoBinding + +class SmartInfoActivity : AppCompatActivity() { + + private var binding: PointMainappDemoAppActivitySmartInfoBinding? = null + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + + binding = PointMainappDemoAppActivitySmartInfoBinding.inflate(layoutInflater) + binding?.run { + setContentView(root) + configSmartInfo() + } + } + + private fun configSmartInfo() { + runCatching { + MPManager.smartInformationTools.getInformation { smartInformation -> + with(smartInformation.smartDevice) { + val serialNumber = getString(R.string.point_mainapp_demo_app_serial_number_text).format(serialNumber) + val brandName = getString(R.string.point_mainapp_demo_app_brand_name_text).format(brandName) + val modelName = getString(R.string.point_mainapp_demo_app_model_name_text).format(modelName) + + binding?.run { + mainappDemoAppSerialNumberText.text = serialNumber + mainappDemoAppBrandNameText.text = brandName + mainappDemoAppModelNameText.text = modelName + } + } + + with(smartInformation.integration) { + val sdkVersion = getString(R.string.point_mainapp_demo_app_sdk_version_text).format(nativeSdkVersion) + binding?.mainappDemoAppSdkVersionText?.text = sdkVersion + } + } + } + } +} diff --git a/app/src/main/java/com/mercadolibre/android/point_mainapp_demo/app/view/payment/launcher/PaymentLauncherActivity.kt b/app/src/main/java/com/mercadolibre/android/point_mainapp_demo/app/view/payment/launcher/PaymentLauncherActivity.kt index bd6073f..eeefd92 100644 --- a/app/src/main/java/com/mercadolibre/android/point_mainapp_demo/app/view/payment/launcher/PaymentLauncherActivity.kt +++ b/app/src/main/java/com/mercadolibre/android/point_mainapp_demo/app/view/payment/launcher/PaymentLauncherActivity.kt @@ -61,25 +61,22 @@ class PaymentLauncherActivity : AppCompatActivity() { sendPaymentActionButton.setOnClickListener { val amount = amountEditText.text?.toString() val description = binding.descriptionEditText.text?.toString() - try { - amount?.let { - launchPaymentFlowIntent( - amount = it, - description = description, - context = this@PaymentLauncherActivity - ) - } - } catch (e: IllegalAmountException) { - setLayoutError(e.message) + amount?.let { + launchPaymentFlowIntent( + amount = it, + description = description, + context = this@PaymentLauncherActivity + ) } } } } private fun configPaymentMethodList() { - val paymentMethodList = - paymentTool.getPaymentMethods().map { PaymentMethodModel(name = it.name) } - paymentMethodAdapter.submitList(paymentMethodList) + paymentTool.getPaymentMethods { result -> + val paymentMethodList = result.map { PaymentMethodModel(name = it.name) } + paymentMethodAdapter.submitList(paymentMethodList) + } } private fun launchPaymentFlowIntent( @@ -107,7 +104,9 @@ class PaymentLauncherActivity : AppCompatActivity() { uriError, context, lastPaymentMethodSelected - ) + ) { responseException -> + responseException.error?.message.let { errorMessage -> setLayoutError(errorMessage) } + } } private fun setLayoutError(message: String?) { diff --git a/app/src/main/res/layout/point_mainapp_demo_app_activity_home.xml b/app/src/main/res/layout/point_mainapp_demo_app_activity_home.xml index 481401c..395f59e 100644 --- a/app/src/main/res/layout/point_mainapp_demo_app_activity_home.xml +++ b/app/src/main/res/layout/point_mainapp_demo_app_activity_home.xml @@ -1,5 +1,5 @@ - - + app:layout_constraintTop_toTopOf="parent"> - + - + - + - + - + - + - - + + + + + + + + diff --git a/app/src/main/res/layout/point_mainapp_demo_app_activity_smart_info.xml b/app/src/main/res/layout/point_mainapp_demo_app_activity_smart_info.xml new file mode 100644 index 0000000..e47bd65 --- /dev/null +++ b/app/src/main/res/layout/point_mainapp_demo_app_activity_smart_info.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 9b63498..161186c 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -46,5 +46,12 @@ QR Scanner Start Scanner + Smart info + + Serial number: %s + Brand name: %s + Model name: %s + SDK version: %s + Smart info diff --git a/gradle.properties b/gradle.properties index f42ec18..718cd99 100644 --- a/gradle.properties +++ b/gradle.properties @@ -43,7 +43,7 @@ versionName=2.0.0 minSdkVersion = 23 targetSdkVersion=33 compileSdkVersion=33 -buildToolsVersion=33.0.0 +buildToolsVersion=32.0.0 ################################################################################## # Project setup