diff --git a/pos_android_app/build.gradle b/pos_android_app/build.gradle index b22b559..ed97a7f 100644 --- a/pos_android_app/build.gradle +++ b/pos_android_app/build.gradle @@ -143,6 +143,8 @@ dependencies { // ML Kit Face Detection implementation 'com.google.mlkit:face-detection:16.1.6' + implementation 'com.airbnb.android:lottie:6.1.0' + // CameraX (optional but recommended for better camera handling) // implementation "androidx.camera:camera-camera2:1.3.2" // implementation "androidx.camera:camera-lifecycle:1.3.2" diff --git a/pos_android_app/src/main/java/com/dspread/pos/faceID/FaceIDHelper.java b/pos_android_app/src/main/java/com/dspread/pos/faceID/FaceIDHelper.java index 3c1afb0..040f673 100644 --- a/pos_android_app/src/main/java/com/dspread/pos/faceID/FaceIDHelper.java +++ b/pos_android_app/src/main/java/com/dspread/pos/faceID/FaceIDHelper.java @@ -25,16 +25,13 @@ public class FaceIDHelper implements TextureView.SurfaceTextureListener { private static final int REQUEST_CAMERA_PERMISSION = 200; private static final int DETECTION_INTERVAL_MS = 1000; // Check every second - private Context context; private TextureView textureView; private FaceIDCallback callback; - private CameraManager cameraManager; private CameraDevice cameraDevice; private CameraCaptureSession cameraCaptureSession; private CaptureRequest.Builder captureRequestBuilder; - private Handler backgroundHandler; private HandlerThread backgroundThread; private String frontCameraId; @@ -80,7 +77,6 @@ public class FaceIDHelper implements TextureView.SurfaceTextureListener { callback.onCameraError("Camera permission required"); return; } - setupCamera(); } @@ -91,7 +87,6 @@ public class FaceIDHelper implements TextureView.SurfaceTextureListener { callback.onCameraError("Front camera not found"); return; } - textureView.setSurfaceTextureListener(this); } catch (CameraAccessException e) { diff --git a/pos_android_app/src/main/java/com/dspread/pos/printerAPI/PrinterHelper.java b/pos_android_app/src/main/java/com/dspread/pos/printerAPI/PrinterHelper.java index d0d0f82..e3ae472 100644 --- a/pos_android_app/src/main/java/com/dspread/pos/printerAPI/PrinterHelper.java +++ b/pos_android_app/src/main/java/com/dspread/pos/printerAPI/PrinterHelper.java @@ -266,8 +266,8 @@ public class PrinterHelper { // ================== ADDRESS ================== // mPrinter.addText("г. Волгоград, пр. Ленина, д. 92"); // ================== RECEIPT DETAILS ================== - mPrinter.addText("ЧЕК №" + 123465); - mPrinter.addText("Кассир: Иванов И.И."); +// mPrinter.addText("ЧЕК №" + 123465); +// mPrinter.addText("Кассир: Иванов И.И."); SimpleDateFormat dateFormat = new SimpleDateFormat("dd.MM.yyyy", Locale.getDefault()); SimpleDateFormat timeFormat = new SimpleDateFormat("HH:mm:ss", Locale.getDefault()); @@ -292,11 +292,11 @@ public class PrinterHelper { new int[]{PrintStyle.Alignment.CENTER, PrintStyle.Alignment.ALIGN_OPPOSITE} ); - mPrinter.addTexts( - new String[]{" НДС 20%", "= " + String.format("%.2f %s", amount * 0.2, currencySymbol)}, - new int[]{2, 1}, - new int[]{PrintStyle.Alignment.NORMAL, PrintStyle.Alignment.ALIGN_OPPOSITE} - ); +// mPrinter.addTexts( +// new String[]{" НДС 20%", "= " + String.format("%.2f %s", amount * 0.2, currencySymbol)}, +// new int[]{2, 1}, +// new int[]{PrintStyle.Alignment.NORMAL, PrintStyle.Alignment.ALIGN_OPPOSITE} +// ); // ================== TOTALS ================== mPrinter.addText("--------------------------------"); mPrinter.addPrintLintStyle(new PrintLineStyle(PrintStyle.FontStyle.BOLD, PrintLine.CENTER, 28)); diff --git a/pos_android_app/src/main/java/com/dspread/pos/ui/payment/PaymentActivity.java b/pos_android_app/src/main/java/com/dspread/pos/ui/payment/PaymentActivity.java index f024081..44cf715 100644 --- a/pos_android_app/src/main/java/com/dspread/pos/ui/payment/PaymentActivity.java +++ b/pos_android_app/src/main/java/com/dspread/pos/ui/payment/PaymentActivity.java @@ -1,19 +1,25 @@ package com.dspread.pos.ui.payment; import android.app.Dialog; +import android.content.Context; import android.content.Intent; import android.graphics.Bitmap; +import android.net.Uri; import android.os.Bundle; import android.text.Spanned; import android.text.method.LinkMovementMethod; import android.util.Base64; +import android.util.DisplayMetrics; import android.util.Log; +import android.view.Gravity; +import android.view.LayoutInflater; import android.view.TextureView; import android.view.View; import android.view.ViewGroup; import android.view.ViewTreeObserver; import android.widget.ArrayAdapter; import android.widget.ImageButton; +import android.widget.LinearLayout; import android.widget.ListView; import com.alibaba.fastjson.JSONException; @@ -52,6 +58,9 @@ import me.goldze.mvvmhabit.utils.ToastUtils; // Add these imports at the top import android.widget.FrameLayout; +import android.widget.MediaController; +import android.widget.VideoView; + import com.dspread.pos_android_app.databinding.WaitingForCardBinding; // Generated binding class import com.dspread.pos.faceID.FaceIDHelper; @@ -92,6 +101,14 @@ public class PaymentActivity extends BaseActivity videoView.start()); + startTransaction(); } @@ -185,15 +208,40 @@ public class PaymentActivity extends BaseActivity - + diff --git a/pos_android_app/src/main/res/drawable/ax_pinpad_grey.xml b/pos_android_app/src/main/res/drawable/ax_pinpad_grey.xml index 32cf0e8..067d32d 100644 --- a/pos_android_app/src/main/res/drawable/ax_pinpad_grey.xml +++ b/pos_android_app/src/main/res/drawable/ax_pinpad_grey.xml @@ -8,7 +8,7 @@ - + diff --git a/pos_android_app/src/main/res/drawable/ax_scaner_grey.xml b/pos_android_app/src/main/res/drawable/ax_scaner_grey.xml index b70c2e2..6b0f451 100644 --- a/pos_android_app/src/main/res/drawable/ax_scaner_grey.xml +++ b/pos_android_app/src/main/res/drawable/ax_scaner_grey.xml @@ -18,7 +18,7 @@ android:endY="238.43" android:type="linear"> - + diff --git a/pos_android_app/src/main/res/drawable/ax_settings_grey.xml b/pos_android_app/src/main/res/drawable/ax_settings_grey.xml index 1632c0c..58fd01d 100644 --- a/pos_android_app/src/main/res/drawable/ax_settings_grey.xml +++ b/pos_android_app/src/main/res/drawable/ax_settings_grey.xml @@ -18,7 +18,7 @@ android:endY="240.81" android:type="linear"> - + diff --git a/pos_android_app/src/main/res/drawable/logo_yuz_pay_white.xml b/pos_android_app/src/main/res/drawable/logo_yuz_pay_white.xml new file mode 100644 index 0000000..11f0419 --- /dev/null +++ b/pos_android_app/src/main/res/drawable/logo_yuz_pay_white.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + diff --git a/pos_android_app/src/main/res/drawable/new_wallpaper.png b/pos_android_app/src/main/res/drawable/new_wallpaper.png new file mode 100644 index 0000000..9d92477 Binary files /dev/null and b/pos_android_app/src/main/res/drawable/new_wallpaper.png differ diff --git a/pos_android_app/src/main/res/drawable/qr_code_mulberry.png b/pos_android_app/src/main/res/drawable/qr_code_mulberry.png new file mode 100644 index 0000000..e1f2a60 Binary files /dev/null and b/pos_android_app/src/main/res/drawable/qr_code_mulberry.png differ diff --git a/pos_android_app/src/main/res/drawable/qr_site.png b/pos_android_app/src/main/res/drawable/qr_site.png new file mode 100644 index 0000000..7fd974e Binary files /dev/null and b/pos_android_app/src/main/res/drawable/qr_site.png differ diff --git a/pos_android_app/src/main/res/drawable/qr_site_mulberrypos_ru.png b/pos_android_app/src/main/res/drawable/qr_site_mulberrypos_ru.png new file mode 100644 index 0000000..5fa28fe Binary files /dev/null and b/pos_android_app/src/main/res/drawable/qr_site_mulberrypos_ru.png differ diff --git a/pos_android_app/src/main/res/drawable/static_qr_code.png b/pos_android_app/src/main/res/drawable/static_qr_code.png new file mode 100644 index 0000000..36cee7e Binary files /dev/null and b/pos_android_app/src/main/res/drawable/static_qr_code.png differ diff --git a/pos_android_app/src/main/res/drawable/wallpaper_8f25c3.png b/pos_android_app/src/main/res/drawable/wallpaper_8f25c3.png new file mode 100644 index 0000000..b8a3f57 Binary files /dev/null and b/pos_android_app/src/main/res/drawable/wallpaper_8f25c3.png differ diff --git a/pos_android_app/src/main/res/layout/fragment_home.xml b/pos_android_app/src/main/res/layout/fragment_home.xml index 6f7ff73..efd4a04 100644 --- a/pos_android_app/src/main/res/layout/fragment_home.xml +++ b/pos_android_app/src/main/res/layout/fragment_home.xml @@ -11,7 +11,7 @@ + android:background="@drawable/wallpaper_8f25c3"> @@ -72,6 +73,7 @@ > + app:cardBackgroundColor="@android:color/transparent" + app:cardElevation="0dp" + app:cardPreventCornerOverlap="false" + > diff --git a/pos_android_app/src/main/res/layout/waiting_for_card.xml b/pos_android_app/src/main/res/layout/waiting_for_card.xml index 669536b..4147e61 100644 --- a/pos_android_app/src/main/res/layout/waiting_for_card.xml +++ b/pos_android_app/src/main/res/layout/waiting_for_card.xml @@ -20,30 +20,49 @@ android:layout_height="match_parent" android:gravity="center" android:orientation="vertical" - android:padding="16dp"> + android:padding="0dp"> - - + - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -96,7 +116,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" - android:background="#8c1084" + android:background="#71168d" android:padding="5dp"> @@ -169,7 +189,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" - android:background="#8c1084" + android:background="#71168d" android:padding="3dp"> @@ -178,7 +198,7 @@ android:layout_width="match_parent" android:layout_height="170dp" android:scaleType="fitCenter" - android:src="@drawable/am_qr_code_mag_black" + android:src="@drawable/qr_site" android:contentDescription="@string/qr_code_description" app:imageBitmap="@{vm.qrCodeBitmap}" /> @@ -206,21 +226,22 @@ android:layout_height="match_parent" android:gravity="center" android:visibility="gone" + android:scaleType="centerCrop" android:background="@android:color/black"> - + + + + + + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pos_android_app/src/main/res/raw/like_misha_v2.lottie b/pos_android_app/src/main/res/raw/like_misha_v2.lottie new file mode 100644 index 0000000..5c1785c Binary files /dev/null and b/pos_android_app/src/main/res/raw/like_misha_v2.lottie differ diff --git a/pos_android_app/src/main/res/raw/misha_card.mp4 b/pos_android_app/src/main/res/raw/misha_card.mp4 new file mode 100644 index 0000000..f7586d7 Binary files /dev/null and b/pos_android_app/src/main/res/raw/misha_card.mp4 differ diff --git a/pos_android_app/src/main/res/values/colors.xml b/pos_android_app/src/main/res/values/colors.xml index 3c75462..5367f7f 100644 --- a/pos_android_app/src/main/res/values/colors.xml +++ b/pos_android_app/src/main/res/values/colors.xml @@ -9,7 +9,10 @@ #8c1084 - #8c1084 + + #71168d + #8f25c3 + #8c1084 #8c1084 #FF4081 diff --git a/pos_android_app/src/main/res/values/themes.xml b/pos_android_app/src/main/res/values/themes.xml index 5c43a90..b875621 100644 --- a/pos_android_app/src/main/res/values/themes.xml +++ b/pos_android_app/src/main/res/values/themes.xml @@ -49,7 +49,7 @@