25-10-5/1
This commit is contained in:
@@ -356,8 +356,8 @@ Download the Intaleq app now and enjoy your ride!
|
||||
'${'before'.tr} *${d['message']['expirationTime'].toString()}*\n\n'
|
||||
'_*${d['message']['inviteCode'].toString()}*_\n\n'
|
||||
'${"Install our app:".tr}\n'
|
||||
'*Android:* https://play.google.com/store/apps/details?id=com.sefer_driver\n\n\n'
|
||||
'*iOS:* https://apps.apple.com/ae/app/sefer-driver/id6502189302';
|
||||
'*Android:* https://play.google.com/store/apps/details?id=com.intaleq_driver\n\n\n'
|
||||
'*iOS:* https://apps.apple.com/st/app/intaleq-driver/id6482995159';
|
||||
|
||||
launchCommunication('whatsapp', formattedPhoneNumber, message);
|
||||
invitePhoneController.clear();
|
||||
@@ -395,8 +395,8 @@ Download the Intaleq app now and enjoy your ride!
|
||||
'${'before'.tr} *${d['message']['expirationTime'].toString()}*\n\n'
|
||||
'_*${d['message']['inviteCode'].toString()}*_\n\n'
|
||||
'${"Install our app:".tr}\n'
|
||||
'*Android:* https://play.google.com/store/apps/details?id=com.mobileapp.store.ride\n\n\n'
|
||||
'*iOS:* https://apps.apple.com/us/app/sefer/id6458734951';
|
||||
'*Android:* https://play.google.com/store/apps/details?id=com.Intaleq.intaleq\n\n\n'
|
||||
'*iOS:* https://apps.apple.com/st/app/intaleq-rider/id6748075179';
|
||||
|
||||
launchCommunication('whatsapp', formattedPhoneNumber, message);
|
||||
invitePhoneController.clear();
|
||||
|
||||
@@ -26,6 +26,7 @@ import '../../../views/auth/captin/otp_page.dart';
|
||||
import '../../../views/auth/captin/otp_token_page.dart';
|
||||
import '../../../views/auth/syria/pending_driver_page.dart';
|
||||
import '../../firebase/firbase_messge.dart';
|
||||
import '../../firebase/notification_service.dart';
|
||||
import '../../functions/encrypt_decrypt.dart';
|
||||
import '../../functions/package_info.dart';
|
||||
import '../../functions/secure_storage.dart';
|
||||
@@ -258,7 +259,7 @@ class LoginDriverController extends GetxController {
|
||||
update();
|
||||
await SecurityHelper.performSecurityChecks();
|
||||
// Log.print('(BoxName.emailDriver): ${box.read(BoxName.emailDriver)}');
|
||||
|
||||
// await getJWT();
|
||||
var res = await CRUD().get(link: AppLink.loginFromGoogleCaptin, payload: {
|
||||
'email': email ?? 'yet',
|
||||
'id': driverID,
|
||||
@@ -328,8 +329,11 @@ class LoginDriverController extends GetxController {
|
||||
// if (box.read(BoxName.emailDriver).toString() !=
|
||||
// '963992952235@intaleqapp.com') {
|
||||
if (token != 'failure') {
|
||||
if ((jsonDecode(token)['data'][0]['token'].toString()) !=
|
||||
box.read(BoxName.tokenDriver).toString()) {
|
||||
var serverData = jsonDecode(token);
|
||||
if ((serverData['data'][0]['token'].toString()) !=
|
||||
box.read(BoxName.tokenDriver).toString() ||
|
||||
serverData['data'][0]['fingerPrint'].toString() !=
|
||||
fingerPrint.toString()) {
|
||||
await Get.defaultDialog(
|
||||
barrierDismissible: false,
|
||||
title: 'Device Change Detected'.tr,
|
||||
@@ -534,12 +538,20 @@ class LoginDriverController extends GetxController {
|
||||
if (token != 'failure') {
|
||||
if ((jsonDecode(token)['data'][0]['token']) !=
|
||||
(box.read(BoxName.tokenDriver))) {
|
||||
Get.put(FirebaseMessagesController()).sendNotificationToDriverMAP(
|
||||
'token change'.tr,
|
||||
'change device'.tr,
|
||||
(jsonDecode(token)['data'][0]['token']).toString(),
|
||||
[],
|
||||
'ding.wav');
|
||||
// Get.put(FirebaseMessagesController()).sendNotificationToDriverMAP(
|
||||
// 'token change'.tr,
|
||||
// 'change device'.tr,
|
||||
// (jsonDecode(token)['data'][0]['token']).toString(),
|
||||
// [],
|
||||
// 'ding.wav');
|
||||
NotificationService.sendNotification(
|
||||
target: (jsonDecode(token)['data'][0]['token']).toString(),
|
||||
title: 'token change',
|
||||
body: 'token change'.tr,
|
||||
isTopic: false, // Important: this is a token
|
||||
tone: 'cancel',
|
||||
driverList: [],
|
||||
);
|
||||
Get.defaultDialog(
|
||||
title: 'you will use this device?'.tr,
|
||||
middleText: '',
|
||||
|
||||
@@ -8,6 +8,7 @@ import '../../../constant/box_name.dart';
|
||||
import '../../../constant/links.dart';
|
||||
import '../../../main.dart';
|
||||
import '../../firebase/firbase_messge.dart';
|
||||
import '../../firebase/notification_service.dart';
|
||||
import '../../functions/crud.dart';
|
||||
|
||||
class OtpVerificationController extends GetxController {
|
||||
@@ -101,12 +102,20 @@ class OtpVerificationController extends GetxController {
|
||||
? Get.find<FirebaseMessagesController>()
|
||||
: Get.put(FirebaseMessagesController());
|
||||
|
||||
await fcm.sendNotificationToDriverMAP(
|
||||
'token change',
|
||||
'change device'.tr,
|
||||
ptoken.toString(),
|
||||
[],
|
||||
'cancel.wav',
|
||||
// await fcm.sendNotificationToDriverMAP(
|
||||
// 'token change',
|
||||
// 'change device'.tr,
|
||||
// ptoken.toString(),
|
||||
// [],
|
||||
// 'cancel.wav',
|
||||
// );
|
||||
await NotificationService.sendNotification(
|
||||
target: ptoken.toString(),
|
||||
title: 'token change',
|
||||
body: 'token change'.tr,
|
||||
isTopic: false, // Important: this is a token
|
||||
tone: 'cancel',
|
||||
driverList: [],
|
||||
);
|
||||
|
||||
Get.offAll(() => HomeCaptain());
|
||||
|
||||
Reference in New Issue
Block a user