Skip to content

Commit

Permalink
[SMARTI-1399] bump version sdk 2.8.0 (#41)
Browse files Browse the repository at this point in the history
* Feature barcode reader has been implemented

* update version library SDK

* update CHANGELOG.md

* update name library

---------

Co-authored-by: Jaime Trujillo <[email protected]>
  • Loading branch information
ymrMeli and jan951002 authored Jun 18, 2024
1 parent a251b16 commit 1d55e47
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 9 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# v2.8.0
## Added
- The functionality for reading barcodes was added.
- Added functionality to obtain the client Id from the manifest.
- Added field to enable or disable oauth.

# v2.7.0
## Added
- Added traceability for all SDK functionalities.
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ android {

dependencies {

mainappImplementation files("libs/nativesdk-mainapp-2.7.0.aar")
miniappImplementation files("libs/nativesdk-miniapp-2.7.0.aar")
mainappImplementation files("libs/nativesdk-mainapp-2.8.0.aar")
miniappImplementation files("libs/nativesdk-miniapp-2.8.0.aar")
// AndroidX
implementation "androidx.constraintlayout:constraintlayout:$constraintLayoutVersion"
implementation "androidx.appcompat:appcompat:$appcompatVersion"
Expand Down
Binary file removed app/libs/nativesdk-mainapp-2.7.0.aar
Binary file not shown.
Binary file added app/libs/nativesdk-mainapp-2.8.0.aar
Binary file not shown.
Binary file removed app/libs/nativesdk-miniapp-2.7.0.aar
Binary file not shown.
Binary file added app/libs/nativesdk-miniapp-2.8.0.aar
Binary file not shown.
6 changes: 6 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@
<activity
android:name=".view.camera.CameraScannerActivity"
android:exported="false" />
<meta-data
android:name="com.mercadolibre.android.sdk.CLIENT_ID"
android:value="193213529837179L" />
<meta-data
android:name="com.mercadolibre.android.sdk.OAUTH_ENABLED"
android:value="false" />
</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,18 @@ class CameraScannerActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(binding.root)
binding.pointMainappDemoAppCameraScannerInitBtn.setOnClickListener {
binding.pointMainappDemoAppCameraQrScannerInitBtn.setOnClickListener {
MPManager.cameraScanner.initQRCodeScanner(this)
}

binding.pointMainappDemoAppCameraBarcodeScannerInitBtn.setOnClickListener {
MPManager.cameraScanner.initBarcodeScanner(this)
}
}

override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)
MPManager.cameraScanner.handleQrResponse(resultCode, data)
MPManager.cameraScanner.handleScannerResponse(resultCode, data)
.doIfSuccess { qrResult ->
binding.run {
pointMainappDemoAppStateImg.visibility = View.VISIBLE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,35 @@
app:layout_constraintTop_toTopOf="parent" />

<com.google.android.material.button.MaterialButton
android:id="@+id/point_mainapp_demo_app_camera_scanner_init_btn"
android:id="@+id/point_mainapp_demo_app_camera_qr_scanner_init_btn"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginHorizontal="@dimen/ui_6m"
android:layout_marginTop="24dp"
android:paddingVertical="@dimen/ui_1_25m"
android:text="@string/point_mainapp_demo_app_cammera_scanner_start_scan_title"
android:text="@string/point_mainapp_demo_app_cammera_scanner_start_scan_qr_title"
android:textAllCaps="false"
app:cornerRadius="@dimen/ui_1_25m"
app:icon="@drawable/point_mainapp_demo_app_ic_payments"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/point_mainapp_demo_app_camera_scanner_title" />

<com.google.android.material.button.MaterialButton
android:id="@+id/point_mainapp_demo_app_camera_barcode_scanner_init_btn"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginHorizontal="@dimen/ui_6m"
android:layout_marginTop="24dp"
android:paddingVertical="@dimen/ui_1_25m"
android:text="@string/point_mainapp_demo_app_cammera_scanner_start_barcode_title"
android:textAllCaps="false"
app:cornerRadius="@dimen/ui_1_25m"
app:icon="@drawable/point_mainapp_demo_app_ic_payments"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/point_mainapp_demo_app_camera_qr_scanner_init_btn" />

<TextView
android:id="@+id/point_mainapp_demo_app_camera_scanner_result"
android:layout_width="0dp"
Expand All @@ -57,7 +72,7 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:visibility="gone"
app:layout_constraintTop_toBottomOf="@+id/point_mainapp_demo_app_camera_scanner_init_btn"
app:layout_constraintTop_toBottomOf="@+id/point_mainapp_demo_app_camera_barcode_scanner_init_btn"
app:srcCompat="@drawable/point_mainapp_demo_app_ic_check_white" />

</androidx.constraintlayout.widget.ConstraintLayout>
5 changes: 3 additions & 2 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@
<string name="point_mainapp_demo_app_text_button_printer_bitmap">Print image</string>

<!-- Camera Scanner -->
<string name="point_mainapp_demo_app_cammera_scanner_main_title">QR Scanner</string>
<string name="point_mainapp_demo_app_cammera_scanner_start_scan_title">Start Scanner</string>
<string name="point_mainapp_demo_app_cammera_scanner_main_title">Camera Scanner</string>
<string name="point_mainapp_demo_app_cammera_scanner_start_scan_qr_title">Start QR Scanner</string>
<string name="point_mainapp_demo_app_cammera_scanner_start_barcode_title">Start barcode Scanner</string>
<string name="point_mainapp_demo_app_cammera_scanner_start_scan_success">Successful reading: %s</string>
<string name="point_mainapp_demo_app_cammera_scanner_start_scan_error">Error: %s</string>
<string name="point_mainapp_demo_app_cammera_scanner_start_scan_undefined">Undefined: %s</string>
Expand Down

0 comments on commit 1d55e47

Please sign in to comment.