diff --git a/android/app/build.gradle b/android/app/build.gradle
index 8d596f6..e1a25f6 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -42,15 +42,17 @@ android {
// Merged the two defaultConfig sections into one. This is the correct way.
defaultConfig {
applicationId = "com.intaleq_driver"
- minSdkVersion = 23
+ minSdkVersion = flutter.minSdkVersion
targetSdk = 36
- versionCode = 57
- versionName = '1.1.57' // I've used the higher version name
+ versionCode = 59
+ versionName = '1.1.59' // I've used the higher version name
multiDexEnabled = true
ndk {
abiFilters "armeabi-v7a", "arm64-v8a" // Keep these!
}
+ manifestPlaceholders += [mapsApiKey: keystoreProperties['mapsApiKey'] ?: ""]
+
}
signingConfigs {
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index 4950264..0c384fb 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -46,7 +46,9 @@
android:name="io.flutter.embedding.android.BackgroundExecutor.DART_LIBRARY_URI"
android:value="main.dart" /> -->
-
+
diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml
index 4e20b0e..24f9a39 100755
--- a/android/app/src/main/res/values/strings.xml
+++ b/android/app/src/main/res/values/strings.xml
@@ -3,9 +3,9 @@
high_importance_channel
- AIzaSyACAeqD8qnNYwHKj1qRec6F3AKzdo__CiQ
+ e
Security Warning
- AIzaSyB04YNW3LbvmQ5lX1t2bOwEU18-KUoovzw
+ AIzaSyB04YNW3LbvmQ5lX1t2bOwEU18-
Intaleq Driver
A security issue or modification has been detected on
diff --git a/android/build.gradle b/android/build.gradle
index 9dc10f0..2813a8f 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -1,24 +1,5 @@
-// allprojects {
-// repositories {
-// google()
-// mavenCentral()
-// }
-// }
-
-// rootProject.buildDir = "../build"
-// subprojects {
-// project.buildDir = "${rootProject.buildDir}/${project.name}"
-// }
-// subprojects {
-// project.evaluationDependsOn(":app")
-// }
-
-// tasks.register("clean", Delete) {
-// delete rootProject.buildDir
-// }
-
buildscript {
- ext.kotlin_version = '1.9.23'
+ ext.kotlin_version = '2.1.0'
repositories {
google()
mavenCentral()
diff --git a/lib/constant/box_name.dart b/lib/constant/box_name.dart
index 6cc4150..5da4c88 100755
--- a/lib/constant/box_name.dart
+++ b/lib/constant/box_name.dart
@@ -13,6 +13,7 @@ class BoxName {
static const String FCM_PRIVATE_KEY = "FCM_PRIVATE_KEY";
static const String hmac = "hmac";
static const String ttsEnabled = "ttsEnabled";
+ static const String security_check = "security_check";
static const String rideType = "rideType";
static const String walletType = "walletType";
static const String fingerPrint = "fingerPrint";
diff --git a/lib/controller/auth/captin/login_captin_controller.dart b/lib/controller/auth/captin/login_captin_controller.dart
index e2e59b0..5f68058 100755
--- a/lib/controller/auth/captin/login_captin_controller.dart
+++ b/lib/controller/auth/captin/login_captin_controller.dart
@@ -128,13 +128,11 @@ class LoginDriverController extends GetxController {
var dev = '';
getJwtWallet() async {
- final random = Random();
-
- if (random.nextBool()) {
- await SecurityHelper.performSecurityChecks();
- } else {
- await SecurityChecks.isDeviceRootedFromNative(Get.context!);
+ if (box.read(BoxName.security_check).toString() != 'passed') {
+ Log.print('Security check failed');
+ return;
}
+ Log.print('Security check passed');
String fingerPrint = await DeviceHelper.getDeviceFingerprint();
// print('fingerPrint: ${fingerPrint}');
dev = Platform.isAndroid ? 'android' : 'ios';
diff --git a/lib/controller/functions/overlay_permisssion.dart b/lib/controller/functions/overlay_permisssion.dart
index cfcd9c9..aabe2ba 100755
--- a/lib/controller/functions/overlay_permisssion.dart
+++ b/lib/controller/functions/overlay_permisssion.dart
@@ -35,14 +35,14 @@ Future showDriverGiftClaim(BuildContext context) async {
if (box.read(BoxName.is_claimed).toString() == '0' ||
box.read(BoxName.is_claimed) == null) {
MyDialog().getDialog(
- 'You have gift 30000 SYP'.tr, 'This for new registration'.tr, () async {
+ 'You have gift 300 SYP'.tr, 'This for new registration'.tr, () async {
Get.back();
var res = await CRUD().post(link: AppLink.updateDriverClaim, payload: {
'driverId': box.read(BoxName.driverID),
});
if (res != 'failure') {
Get.find()
- .addDriverWallet('new driver', '30000', '30000');
+ .addDriverWallet('new driver', '300', '300');
Confetti.launch(
context,
options:
diff --git a/lib/controller/functions/package_info.dart b/lib/controller/functions/package_info.dart
index 24a708b..9eb2f67 100755
--- a/lib/controller/functions/package_info.dart
+++ b/lib/controller/functions/package_info.dart
@@ -265,6 +265,8 @@ class SecurityHelper {
// print("security_warning".tr); //using easy_localization
// Use a more robust approach to show a warning, like a dialog:
_showSecurityWarning();
+ } else {
+ box.write(BoxName.security_check, 'passed');
}
}
diff --git a/lib/controller/functions/security_checks.dart b/lib/controller/functions/security_checks.dart
index cc8c0d1..b1715cc 100755
--- a/lib/controller/functions/security_checks.dart
+++ b/lib/controller/functions/security_checks.dart
@@ -2,6 +2,9 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:get/get.dart';
+import '../../constant/box_name.dart';
+import '../../main.dart';
+
class SecurityChecks {
static const platform = MethodChannel(
'com.intaleq_driver/security'); // Choose a unique channel name
@@ -39,6 +42,8 @@ class SecurityChecks {
),
);
} else {
+ box.write(BoxName.security_check, 'passed');
+
// Continue with normal app flow
print("Device is secure.");
}
diff --git a/lib/controller/home/captin/map_driver_controller.dart b/lib/controller/home/captin/map_driver_controller.dart
index 3a5135a..733cf3b 100755
--- a/lib/controller/home/captin/map_driver_controller.dart
+++ b/lib/controller/home/captin/map_driver_controller.dart
@@ -1585,7 +1585,7 @@ class MapDriverController extends GetxController {
/// **جلب ورسم المسار (OSRM - New Standard System)**
///
- /// تستخدم السيرفر الجديد: https://routesjo.intaleq.xyz/route/v1/driving
+ /// تستخدم السيرفر الجديد: https://routesy.intaleq.xyz/route/v1/driving
Future getRoute({
required LatLng origin,
required LatLng destination,
@@ -1596,7 +1596,7 @@ class MapDriverController extends GetxController {
'${origin.longitude},${origin.latitude};${destination.longitude},${destination.latitude}';
// استخدام الرابط من الكلاس المرجعي لأنه أحدث
var url =
- "https://routesjo.intaleq.xyz/route/v1/driving/$coordinates?steps=true&overview=full";
+ "https://routesy.intaleq.xyz/route/v1/driving/$coordinates?steps=true&overview=full";
try {
var response = await http.get(Uri.parse(url));
diff --git a/lib/controller/home/captin/order_request_controller.dart b/lib/controller/home/captin/order_request_controller.dart
index 37aa12d..fc7bc3c 100755
--- a/lib/controller/home/captin/order_request_controller.dart
+++ b/lib/controller/home/captin/order_request_controller.dart
@@ -264,7 +264,7 @@ class OrderRequestController extends GetxController
// حماية من الإحداثيات الصفرية
if (start.latitude == 0 || end.latitude == 0) return null;
- String apiUrl = "https://routesjo.intaleq.xyz/route/v1/driving";
+ String apiUrl = "https://routesy.intaleq.xyz/route/v1/driving";
String coords =
"${start.longitude},${start.latitude};${end.longitude},${end.latitude}";
String url = "$apiUrl/$coords?steps=false&overview=full";
diff --git a/lib/controller/home/navigation/navigation_controller.dart b/lib/controller/home/navigation/navigation_controller.dart
index 76e3d3d..f8f0a76 100644
--- a/lib/controller/home/navigation/navigation_controller.dart
+++ b/lib/controller/home/navigation/navigation_controller.dart
@@ -62,7 +62,7 @@ class NavigationController extends GetxController {
// الرابط الجديد
static const String _routeApiBaseUrl =
- "https://routesjo.intaleq.xyz/route/v1/driving";
+ "https://routesy.intaleq.xyz/route/v1/driving";
@override
void onInit() {
diff --git a/lib/controller/home/splash_screen_controlle.dart b/lib/controller/home/splash_screen_controlle.dart
index 81d72e3..67788c4 100755
--- a/lib/controller/home/splash_screen_controlle.dart
+++ b/lib/controller/home/splash_screen_controlle.dart
@@ -1,4 +1,5 @@
import 'dart:async';
+import 'dart:math';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
@@ -12,7 +13,9 @@ import '../../main.dart';
import '../../onbording_page.dart';
import '../../print.dart';
import '../functions/encrypt_decrypt.dart';
+import '../functions/package_info.dart';
import '../functions/secure_storage.dart';
+import '../functions/security_checks.dart';
// Assuming you have a home page to navigate to after successful login.
// If not, you might need to adjust the navigation target.
@@ -32,6 +35,17 @@ class SplashScreenController extends GetxController
super.onInit();
_setupAnimations();
_initializeAndNavigate();
+ checkSecurity();
+ }
+
+ checkSecurity() async {
+ final random = Random();
+
+ if (random.nextBool()) {
+ await SecurityHelper.performSecurityChecks();
+ } else {
+ await SecurityChecks.isDeviceRootedFromNative(Get.context!);
+ }
}
void _setupAnimations() {
diff --git a/lib/print.dart b/lib/print.dart
index ccc2fb5..63efb2d 100755
--- a/lib/print.dart
+++ b/lib/print.dart
@@ -4,10 +4,10 @@ class Log {
Log._();
static void print(String value, {StackTrace? stackTrace}) {
- developer.log(value, name: 'LOG', stackTrace: stackTrace);
+ // developer.log(value, name: 'LOG', stackTrace: stackTrace);
}
static Object? inspect(Object? object) {
- return developer.inspect(object);
+ // return developer.inspect(object);
}
}
diff --git a/pubspec.lock b/pubspec.lock
index f3b6c5e..030a452 100644
--- a/pubspec.lock
+++ b/pubspec.lock
@@ -1490,26 +1490,26 @@ packages:
dependency: transitive
description:
name: leak_tracker
- sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0"
+ sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de"
url: "https://pub.dev"
source: hosted
- version: "10.0.9"
+ version: "11.0.2"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
- sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573
+ sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1"
url: "https://pub.dev"
source: hosted
- version: "3.0.9"
+ version: "3.0.10"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
- sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
+ sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1"
url: "https://pub.dev"
source: hosted
- version: "3.0.1"
+ version: "3.0.2"
lints:
dependency: transitive
description:
@@ -1642,10 +1642,10 @@ packages:
dependency: transitive
description:
name: meta
- sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
+ sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394"
url: "https://pub.dev"
source: hosted
- version: "1.16.0"
+ version: "1.17.0"
mgrs_dart:
dependency: transitive
description:
@@ -2278,10 +2278,10 @@ packages:
dependency: transitive
description:
name: test_api
- sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd
+ sha256: ab2726c1a94d3176a45960b6234466ec367179b87dd74f1611adb1f3b5fb9d55
url: "https://pub.dev"
source: hosted
- version: "0.7.4"
+ version: "0.7.7"
timezone:
dependency: transitive
description:
@@ -2422,10 +2422,10 @@ packages:
dependency: transitive
description:
name: vector_math
- sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
+ sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b
url: "https://pub.dev"
source: hosted
- version: "2.1.4"
+ version: "2.2.0"
vibration:
dependency: "direct main"
description: